Library of World Assembly walibrarywiki https://walibrary.miraheze.org/wiki/Main_Page MediaWiki 1.40.1 first-letter Media Special Talk User User talk Library of World Assembly Library of World Assembly talk File File talk MediaWiki MediaWiki talk Template Template talk Help Help talk Category Category talk Form Form talk Module Module talk Template:Collapsible list 10 10 15 2013-11-02T05:07:45Z en>Fuhghettaboutit 0 Changed protection level of Template:Collapsible list: Enable access by template editors ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)) wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:collapsible list|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> aff61df28bcc6c3457d6aa36ada4fffe68c409a9 Template:Dated maintenance category 10 119 296 2014-01-08T08:14:55Z en>John of Reading 0 Second attempt. Those spaces upset inline templates such as {{As of}}. Instead, try an unconditional <nowiki/> wikitext text/x-wiki <nowiki/><!--This nowiki helps to prevent whitespace at the top of articles-->{{#ifeq:{{FULLROOTPAGENAME}}|Wikipedia:Template messages|<!--Do not categorize-->|<!-- -->{{#ifexpr:{{#if:{{NAMESPACE}}|0|1}}+{{#ifeq:{{{onlyarticles|no}}}|yes|0|1}} |{{#if:{{{3|}}} |[[Category:{{{1}}} {{{2}}} {{{3}}}]]<!-- -->{{#ifexist:Category:{{{1}}} {{{2}}} {{{3}}} |<!-- -->|[[Category:Articles with invalid date parameter in template]]<!-- -->}} |[[Category:{{#if:{{{5|}}} |{{{5}}}<!-- -->|{{{1}}}<!-- -->}}]]<!-- -->}}{{#if:{{{4|}}} |[[Category:{{{4}}}]]}}<!-- -->}}<!-- -->}}<noinclude> {{documentation}} </noinclude> 41e7d4000124d4f718ddf222af0b72825048c4c4 Template:When on basepage 10 211 588 2014-09-30T08:52:52Z en>Sardanaphalus 0 Sardanaphalus moved page [[Template:Basepage subpage]] to [[Template:When on basepage]]: Per move request wikitext text/x-wiki {{#switch: <!--If no or empty "page" parameter then detect basepage/subpage/subsubpage--> {{#if:{{{page|}}} | {{#if:{{#titleparts:{{{page}}}|0|3}} | subsubpage <!--Subsubpage or lower--> | {{#if:{{#titleparts:{{{page}}}|0|2}} | subpage | basepage }} }} | {{#if:{{#titleparts:{{FULLPAGENAME}}|0|3}} | subsubpage <!--Subsubpage or lower--> | {{#if:{{#titleparts:{{FULLPAGENAME}}|0|2}} | subpage | basepage }} }} }} | basepage = {{{1|}}} | subpage = {{{2|}}} | subsubpage = {{{3| {{{2|}}} }}} <!--Respecting empty parameter on purpose--> }}<!--End switch--><noinclude> {{Documentation}} </noinclude> cf4dc92df647a26ab0ce149772a1fe3ac6c3dfc0 Module:Ns has subpages 828 125 308 2014-12-10T06:37:29Z en>Mr. Stradivarius 0 Protected Module:Ns has subpages: [[WP:High-risk templates|High-risk Lua module]] ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)) Scribunto text/plain -- This module implements [[Template:Ns has subpages]]. -- While the template is fairly simple, this information is made available to -- Lua directly, so using a module means that we don't have to update the -- template as new namespaces are added. local p = {} function p._main(ns, frame) -- Get the current namespace if we were not passed one. if not ns then ns = mw.title.getCurrentTitle().namespace end -- Look up the namespace table from mw.site.namespaces. This should work -- for a majority of cases. local nsTable = mw.site.namespaces[ns] -- Try using string matching to get the namespace from page names. -- Do a quick and dirty bad title check to try and make sure we do the same -- thing as {{NAMESPACE}} in most cases. if not nsTable and type(ns) == 'string' and not ns:find('[<>|%[%]{}]') then local nsStripped = ns:gsub('^[_%s]*:', '') nsStripped = nsStripped:gsub(':.*$', '') nsTable = mw.site.namespaces[nsStripped] end -- If we still have no match then try the {{NAMESPACE}} parser function, -- which should catch the remainder of cases. Don't use a mw.title object, -- as this would increment the expensive function count for each new page -- tested. if not nsTable then frame = frame or mw.getCurrentFrame() local nsProcessed = frame:callParserFunction('NAMESPACE', ns) nsTable = nsProcessed and mw.site.namespaces[nsProcessed] end return nsTable and nsTable.hasSubpages end function p.main(frame) local ns = frame:getParent().args[1] if ns then ns = ns:match('^%s*(.-)%s*$') -- trim whitespace ns = tonumber(ns) or ns end local hasSubpages = p._main(ns, frame) return hasSubpages and 'yes' or '' end return p e133068ba73738b16e1e3eba47735516a461eb5b Template:Flag 10 157 376 2014-12-18T05:55:14Z wikipedia>Plastikspork 0 Closing wikitext text/x-wiki {{country data {{{1|}}}|flag/core|name={{{name|{{{1|}}}}}}|variant={{{variant|{{{2|}}}}}}|size={{{size|}}}}}<noinclude>{{documentation}}</noinclude> d13aac8e23bee030a6fc9b49a8aa1135104ace22 Template:Color 10 131 324 2015-02-07T15:43:19Z wikipedia>Pigsonthewing 0 allow simple form; will document wikitext text/x-wiki <span style="color:{{{1|}}}">{{{2|{{{1|}}}}}}</span><noinclude>{{Documentation}}<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --></noinclude> f12cd387c0d5c11494a7182b7538cc3292eb3a4a Template:Trim 10 71 143 2015-06-27T18:27:45Z m>Plastikspork 0 Merging [[Template:Strip whitespace]] per TfD wikitext text/x-wiki <includeonly>{{ {{{|safesubst:}}}#if:1|{{{x|{{{1|}}}}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> 93c34a8e6f43c0598a6e878ed80599647730ace9 Template:Hlist 10 82 216 2015-07-04T15:13:14Z en>Penwhale 0 Changed protection level of Template:Hlist: [[WP:High-risk templates|Highly visible template]] ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)) wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|horizontal}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 9e3824c2e3c0e0dbef2f37556ac0b994987fecf9 Template:Nowrap 10 160 382 2015-11-28T10:13:53Z wikipedia>Edokter 0 Adapt comment; edits inside noinclude blocks should not affect job queue, but won't kill parser either way. wikitext text/x-wiki <span class="nowrap">{{{1}}}</span><noinclude> {{documentation}} <!-- Categories go on the /doc page; interwikis go to Wikidata. --> </noinclude> 5d0dc6b6d89b37f4356242404f46138a4017f015 Template:PAGENAMEBASE 10 74 564 2016-03-06T09:37:56Z en>Cabayi 0 per edit request & discussion wikitext text/x-wiki {{{{{|safesubst:}}}#Invoke:String|replace|{{{1|{{{{{|safesubst:}}}PAGENAME}}}}}|%s+%b()$||1|false}}<noinclude> {{documentation}} </noinclude> f23a5d434cb5b0baac5e1f58e9ceef9118e6873f 171 2018-04-17T05:54:19Z en>The Open Parliament 0 2 revisions imported wikitext text/x-wiki {{{{{|safesubst:}}}#Invoke:String|replace|{{{1|{{{{{|safesubst:}}}PAGENAME}}}}}|%s+%b()$||1|false}}<noinclude> {{documentation}} </noinclude> f23a5d434cb5b0baac5e1f58e9ceef9118e6873f Template:Str left 10 31 57 2016-09-30T07:01:19Z en>Ymblanter 0 Changed protection level of Template:Str left: [[WP:High-risk templates|Highly visible template]]: RFPP request ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki <includeonly>{{safesubst:padleft:|{{{2|1}}}|{{{1}}}}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 2048b0d7b35e156528655b1d090e8b5ffab3f400 197 57 2018-06-27T03:43:02Z en>Anaaxes 0 1 revision imported wikitext text/x-wiki <includeonly>{{safesubst:padleft:|{{{2|1}}}|{{{1}}}}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 2048b0d7b35e156528655b1d090e8b5ffab3f400 Template:Str index 10 90 234 2016-09-30T07:07:16Z en>Ymblanter 0 Changed protection level of Template:Str index: [[WP:High-risk templates|Highly visible template]]: RFPP request ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki <includeonly>{{{{{|safesubst:}}}#Invoke:String | pos | target={{{1|}}} | pos={{{2|0}}} | no_category={{{nocategory|}}} }}</includeonly><noinclude> {{documentation}} </noinclude> 2df88ba968cdbbcf14c1d54065af3b961aa803a0 Template:Big 10 79 210 2016-11-21T11:09:43Z en>Materialscientist 0 Changed protection level for "[[Template:Big]]" ([Edit=Require template editor access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki <span style="font-size: 120%;">{{{1}}}</span><noinclude> {{Documentation}} <!-- Please add categories to the /doc subpage; interwikis go to Wikidata, thank you. --> </noinclude> 921a29fc5d6c9a23b246400fe247ba4f2e0f2aaf Template:Section link 10 88 230 2017-01-17T01:29:39Z en>Primefac 0 done wikitext text/x-wiki {{#invoke:Section link|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 8d047e5845f8a9b74a4655b5dd79ca7595a8f88b Template:Font color 10 69 137 2017-01-29T21:37:24Z m>Plastikspork 0 TFD closed as do not merge (using [[User:Evad37/TFDcloser|TFDcloser]]) wikitext text/x-wiki {{ {{{|safesubst:}}}#if: {{{text|{{{3|}}}}}} | {{ {{{|safesubst:}}}#if: {{{link|}}} | {{ {{{|safesubst:}}}#ifeq: {{{link|}}} | yes | [[ {{ {{{|safesubst:}}}trim | {{{text|{{{3|}}}}}} }}|<span style="background-color:{{ {{{|safesubst:}}}trim | {{{bg|{{{2|inherit}}}}}} }}; color:{{ {{{|safesubst:}}}trim | {{{fg|{{{1|inherit}}}}}} }};">{{ {{{|safesubst:}}}trim | {{{text|{{{3|}}}}}} }}</span>]] | [[{{{link|}}}|<span style="background-color:{{ {{{|safesubst:}}}trim | {{{bg|{{{2|inherit}}}}}} }}; color:{{ {{{|safesubst:}}}trim | {{{fg|{{{1|inherit}}}}}} }};">{{ {{{|safesubst:}}}trim | {{{text|{{{3|}}}}}} }}</span>]] }} | <span style="background-color:{{ {{{|safesubst:}}}trim | {{{bg|{{{2|inherit}}}}}} }}; color:{{ {{{|safesubst:}}}trim | {{{fg|{{{1|inherit}}}}}} }};">{{ {{{|safesubst:}}}trim | {{{text|{{{3|}}}}}} }}</span> }} | {{ {{{|safesubst:}}}#if: {{{link|}}} | {{ {{{|safesubst:}}}#ifeq: {{{link|}}} | yes | [[ {{ {{{|safesubst:}}}trim | {{{bg|{{{2|}}}}}} }} |<span style="color:{{ {{{|safesubst:}}}trim | {{{fg|{{{1|inherit}}}}}} }};">{{ {{{|safesubst:}}}trim | {{{bg|{{{2|}}}}}} }}</span>]] | [[ {{ {{{|safesubst:}}}trim | {{{link|}}} }} |<span style="color:{{ {{{|safesubst:}}}trim | {{{fg|{{{1|inherit}}}}}} }};">{{ {{{|safesubst:}}}trim | {{{bg|{{{2|}}}}}} }}</span>]] }} | <span style="color:{{ {{{|safesubst:}}}trim | {{{fg|{{{1|inherit}}}}}} }};">{{ {{{|safesubst:}}}trim | {{{bg|{{{2|}}}}}} }}</span> }} }}<noinclude> {{documentation}} </noinclude> ee87b9a393f913af47715c9e9772c330125d308b Template:Basepage subpage 10 212 590 2017-03-12T04:26:29Z en>Godsy 0 [[Template:This is a redirect]] has been deprecated, change to [[Template:Redirect category shell]]. wikitext text/x-wiki #REDIRECT [[Template:When on basepage]] {{Redirect category shell| {{R from move}} {{R from template shortcut}} }} 47118a1bed1942b7f143cdff1dec183002fc9f4b Template:Smallsup 10 89 232 2017-03-25T12:38:47Z en>Jo-Jo Eumerus 0 Changed protection level for "[[Template:Smallsup]]": Allowing template editors on some templates with full protection dating back to pre-[[WP:TPROT|TPROT]] times which aren't too often or too sensitively used. ([Edit=Require template editor access] (i... wikitext text/x-wiki <includeonly><sup><small>{{{1}}}</small></sup></includeonly><noinclude> {{Documentation}} </noinclude> c174fb3247218273210500118556feb9f3c76d5a Template:SUBJECTSPACE formatted 10 204 570 2017-03-25T12:38:48Z en>Jo-Jo Eumerus 0 Changed protection level for "[[Template:SUBJECTSPACE formatted]]": Allowing template editors on some templates with full protection dating back to pre-[[WP:TPROT|TPROT]] times which aren't too often or too sensitively used. ([Edit=Require template edi... wikitext text/x-wiki {{#switch: {{SUBJECTSPACE}} | {{ns:0}} = article | {{ns:4}} = Wikipedia page | {{ns:2}} | {{ns:12}} = {{lc:{{SUBJECTSPACE}}}} page | #default = {{lc:{{SUBJECTSPACE}}}} }}<noinclude> {{Documentation}} </noinclude> 4f84e8059ec30e2a96684cbcd53b80e19ff9f1e5 Template:DMCA 10 118 294 2017-04-08T20:40:50Z en>Jo-Jo Eumerus 0 Changed protection level for "[[Template:DMCA]]": [[WP:High-risk templates|Highly visible template]]: Allowing template editors ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki {{Dated maintenance category |onlyarticles=yes |1={{{1|}}} |2={{{2|}}} |3={{{3|}}} |4={{{4|}}} |5={{{5|}}} }}<noinclude> {{documentation|Template:Dated maintenance category/doc}} </noinclude> 6bbc57c75cc28708a0e71dd658224d5945d80d68 Template:Parameter names example 10 26 47 2017-10-09T17:20:51Z en>MusikAnimal 0 Protected "[[Template:Parameter names example]]": [[WP:High-risk templates|Highly visible template]]; 1,000+ transclusions ([Edit=Require autoconfirmed or confirmed access] (indefinite)) wikitext text/x-wiki <includeonly>{{#invoke:Parameter names example|main}}</includeonly><noinclude> {{hatnote|[[Template:Generic template demo]] and [[Template:Pnex]] redirect here.}}<!--(hatnote more noticeable here than within Documentation)--> {{Documentation}} </noinclude> 6b63b13c0cf74f1f8d250aa644a6bd27e19052f6 Template:Var 10 37 69 2017-12-21T13:31:52Z en>Izno 0 nix xml lang invocation wikitext text/x-wiki <var {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} style="padding-right: 1px;{{{style|}}}" {{#if:{{{lang|}}}|lang="{{{lang}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1}}}</var><noinclude> <!--Categories and interwikis go near the bottom of the /doc page.--> {{Documentation}} </noinclude> 0e9e47694c01ca4c7b29566a1cb11a117dfbf2c0 Template:Remove first word 10 27 49 2018-02-13T20:10:27Z en>WOSlinker 0 separate pp-template not needed wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:String|replace|source={{{1}}}|pattern=^[^{{{sep|%s}}}]*{{{sep|%s}}}*|replace=|plain=false}}<noinclude>{{Documentation}}</noinclude> df7a9e692f68be1581be06af5f51eaed5483b4c8 Template:Yesno-no 10 39 73 2018-02-13T20:27:17Z en>WOSlinker 0 separate pp-template not needed wikitext text/x-wiki {{safesubst:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|no}}}|¬={{{¬|no}}}|def={{{def|no}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 1ad7b7800da1b867ead8f6ff8cef76e6201b3b56 Template:Yesno-yes 10 96 246 2018-03-11T01:06:35Z en>JJMC89 0 allow subst wikitext text/x-wiki {{SAFESUBST:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|yes}}}|¬={{{¬|yes}}}|def={{{def|yes}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 1644b79058ef2cece539a411edc164d98bb11ebe Template:Ifempty 10 77 191 2018-04-17T05:50:12Z en>The Open Parliament 0 2 revisions imported wikitext text/x-wiki #REDIRECT [[Template:If empty]] {{R from move}} fe8fc2d0520a0e1fd1a7759afa77e22d050d2d21 Template:Infobox legislation/images 10 19 193 2018-04-17T05:50:13Z en>The Open Parliament 0 2 revisions imported wikitext text/x-wiki <includeonly>{{#switch:{{{image|}}} <!--AUSTRALIA--> |[[Parliament of Australia]] = Australian Coat of Arms.png |[[Australian Capital Territory Legislative Assembly]] |[[Australian Capital Territory Legislative Assembly|ACT Legislative Assembly]] = Coat of Arms of Canberra.svg |[[Parliament of New South Wales]] = Coat of Arms of New South Wales.svg |[[Northern Territory Parliament]] = Northern Territory Legislative Assembly.jpg |[[Queensland Legislative Assembly]] = Coat of Arms of Queensland.svg |[[Parliament of South Australia]] = Adelaide parliament house.JPG |[[Parliament of Tasmania]] = Tasmania Coat of Arms.svg |[[Parliament of Victoria]] = Victoria Parliament House Melbourne.jpg |[[Parliament of Western Australia]] = Western Australian Coat of Arms.svg <!--CANADA--> |[[Parliament of Canada]] = Parliament-Ottawa.jpg |[[Legislative Assembly of Alberta]] = Day276alegislatureb.JPG |[[Legislative Assembly of British Columbia]] = BC Legislature Buildings.jpg |[[Legislative Assembly of Manitoba]] = Parliamentwinnipeg manitoba.jpg |[[Legislative Assembly of New Brunswick]] = Legislative Assembly of New Brunswick.jpg |[[Newfoundland and Labrador House of Assembly]] = Colonialbuilding.jpg |[[Legislative Assembly of the Northwest Territories]] = Coat of arms of Northwest Territories.svg |[[Nova Scotia House of Assembly]] = Coat of arms of Nova Scotia.svg |[[Legislative Assembly of Nunavut]] = Leg Building Iqaluit 2000-08-27.jpg |[[Legislative Assembly of Ontario]] = Coat of Arms of Ontario.svg |[[Legislative Assembly of Prince Edward Island]] = 282 - Birthplace of Canada Charlottetown PEI.JPG |[[National Assembly of Quebec]] |[[National Assembly of Quebec|L'Assemblée Nationale du Québec]] = Armoiries du Québec.svg |[[Legislative Assembly of Saskatchewan]] = Sask Legislative Bldg.jpg |[[Yukon Legislative Assembly]] = Coat of arms of Yukon.svg <!--INDIA--> |[[Parliament of India]] = Emblem of India.svg <!--IRELAND--> |[[Oireachtas]] = Coat of arms of Ireland.svg <!--ISRAEL--> |[[Knesset]] = Emblem of Israel alternative blue-gold.svg <!--MALAYSIA--> |[[Parliament of Malaysia]] = MalaysianParliament.jpg |[[Johor State Legislative Assembly]] = Sultan Ismail Building.JPG |[[Kedah State Legislative Assembly]] = Coat of arms of Kedah.svg |[[Kelantan State Legislative Assembly]] = Coat of arms of Kelantan.svg |[[Malacca State Legislative Assembly]] = Seri Negeri Blok Laksamana.JPG |[[Negeri Sembilan State Legislative Assembly]] = Coat of arms of Negeri Sembilan.svg |[[Pahang State Legislative Assembly]] = Coat of arms of Pahang.svg |[[Penang State Legislative Assembly]] = Dewan Undangan Negeri Penang Dec 2006 003.jpg |[[Perak State Legislative Assembly]] = Coat of arms of Perak.svg |[[Perlis State Legislative Assembly]] = Coat of arms of Perlis.svg |[[Sabah State Legislative Assembly]] = KotaKinabalu Sabah DewanUndanganNegeriSabah-01.jpg |[[Sarawak State Legislative Assembly]] = Sarawak state assembly building.jpg |[[Selangor State Legislative Assembly]] = Sultan Salahuddin Abdul Aziz Shah building.jpg |[[Terengganu State Legislative Assembly]] = Coat of arms of Terengganu.svg <!--NEW ZEALAND--> |[[Parliament of New Zealand]] = Coat of Arms of New Zealand.svg <!--PHILIPPINES--> |[[National Assembly of the Philippines]] = Coat of arms of the Commonwealth of the Philippines.svg |[[Philippine Legislature]] = Coat of Arms Philippine Islands (1905–1936).svg |[[Commonwealth Congress]] = Coat of arms of the Commonwealth of the Philippines.svg |[[Batasang Pambansa]] = Batasang Pambansa Complex Main Building West Front.jpg |[[Congress of the Philippines]] = Coat of Arms of the Philippines.svg |[[President of the Philippines]] = Seal of the President of the Philippines.svg <!--SINGAPORE--> |[[Parliament of Singapore]] = {{#ifexpr:{{gsd|day={{#time:j|{{{date|}}}}}|month={{#time:n|{{{date|}}}}}|year={{#time:Y|{{{date|}}}}} }}<730003|Old Parliament House 4, Singapore, Jan 06.JPG|Parliament House Singapore.jpg}} <!--SOUTH AFRICA--> |[[Parliament of South Africa]] = Houses of Parliament (Cape Town).jpg |[[Eastern Cape Provincial Legislature]] = <!-- None --> |[[KwaZulu-Natal Legislature]] = KwaZulu-Natal Parliament building, Pietermaritzburg, South Africa.jpg |[[Western Cape Provincial Legislature]] |[[Western Cape Provincial Parliament]] = Western Cape provincial building.jpg <!--STRAITS SETTLEMENTS--> |[[List of British Governors of the Straits Settlements|Governor of the Straits Settlements]] with the advice and consent of the [[Legislative Council of the Straits Settlements|Legislative Council]] = Coat of arms of the Straits Settlements.svg <!--UNITED KINGDOM--> |[[Parliament of the United Kingdom]] = Royal Coat of Arms of the United Kingdom (HM Government).svg |[[Northern Ireland Assembly]] = Coat of Arms of Northern Ireland.svg |[[Scottish Parliament]] = Royal Coat of Arms of the United Kingdom (Scotland).svg |[[National Assembly for Wales]] = Royal Badge of Wales (2008).svg <!--USA--> |[[Government of the United States of America|Government of the United States of America]] = Great Seal of the United States (obverse).svg |[[Congress of the United States]] |[[Congress of the United States|US Congress]] |[[Congress of the United States|U.S. Congress]] = US Congressional Seal.svg |[[Alabama Legislature]] = Seal of Alabama.svg |[[Alaska Legislature]] = Alaska-StateSeal.svg |[[Arizona Legislature]] = Arizonastateseal.jpg |[[Arkansas General Assembly]] = Seal of Arkansas.svg |[[California State Legislature]] = Seal of California.svg |[[Colorado General Assembly]] = Seal of Colorado.svg |[[Connecticut General Assembly]] = Connecticut State Capitol, Hartford.jpg |[[Michigan Legislature]] = Seal of Michigan.svg |[[Utah State Legislature]] = Seal of Utah.svg <!--DEFAULT--> |#default = <!-- None --> }}</includeonly><noinclude>{{Documentation}}</noinclude> 4acbc36398d860af666dc68171ba515dd38c7646 Module:If empty 828 49 201 2018-04-17T06:11:49Z en>The Open Parliament 0 4 revisions imported Scribunto text/plain local p = {} function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false}) -- For backwards compatibility reasons, the first 8 parameters can be unset instead of being blank, -- even though there's really no legitimate use case for this. At some point, this will be removed. local lowestNil = math.huge for i = 8,1,-1 do if args[i] == nil then args[i] = '' lowestNil = i end end for k,v in ipairs(args) do if v ~= '' then if lowestNil < k then -- If any uses of this template depend on the behavior above, add them to a tracking category. -- This is a rather fragile, convoluted, hacky way to do it, but it ensures that this module's output won't be modified -- by it. frame:extensionTag('ref', '[[Category:Instances of Template:If_empty missing arguments]]', {group = 'TrackingCategory'}) frame:extensionTag('references', '', {group = 'TrackingCategory'}) end return v end end end return p 39b83f8d043283ec767774d927e2f6f3fb3078b4 Template:Infobox legislation 10 5 169 2018-04-26T14:55:43Z en>Courelli 0 wikitext text/x-wiki {{Infobox |above = {{{name|{{{short_title|<includeonly>{{PAGENAMEBASE}}</includeonly>}}}}}} |image = {{#invoke:InfoboxImage|InfoboxImage|image={{#if:{{{image|}}} |{{{image}}} |{{Infobox legislation/images |image={{ifempty|{{{legislature|}}}|{{{considered_by|}}}|{{{enacted_by|}}}}} |date={{{date_enacted|}}} }} }}|size={{{imagesize|}}}|sizedefault=frameless|alt={{{imagealt|}}}}} |caption = {{{caption|}}} | subheader = {{#if:{{{before|}}}{{{after|}}}| <table style="width:100%; border-collapse:collapse"><tr style="vertical-align: middle;"> {{#if:{{{before|}}}|<td>&larr;</td><td style="width:{{#if:{{{after|}}}|50|100}}%;text-align:left;">{{{before}}}</td> }} {{#if:{{{after|}}}|<td style="width:{{#if:{{{before|}}}|50|100}}%;text-align:right;">{{{after}}}</td><td>&rarr;</td> }}</tr></table> }} | subheaderstyle = border-top: 1px solid #aaa; |header1 = {{{legislature|}}} |data2 = {{{long_title|}}} |label3 = Citation |data3 = {{{citation|}}} |label4 = Nominee |data4 = {{{nominee|}}} |label5 = Considered by |data5 = {{{considered_by|}}} |label6 = Enacted by |data6 = {{{enacted_by|}}} |label7 = Date passed |data7 = {{{date_passed|}}} |label8 = Date enacted |data8 = {{{date_enacted|}}} |label9 = Enacted by |data9 = {{{enacted_by2|}}} |label10 = Date passed |data10 = {{{date_passed2|}}} |label11 = Date enacted |data11 = {{{date_enacted2|}}} |label12 = Date signed |data12 = {{{date_signed|}}} |label13 = Signed by |data13 = {{{signed_by|}}} |label14 = Date commenced |data14 = {{{date_commenced|{{{commencement|}}}}}} |label15 = [[Effective date|Date effective]] |data15 = {{{date_effective|}}} |label16 = Date of expiry |data16 = {{{date_of_expiry|}}} |label17 = Date repealed |data17 = {{{date_repealed|}}} |label18 = Administered by |data18 = {{{administered_by|}}} |header30 = {{#if:{{{bill|}}}{{{bill_date|}}}{{{1st_reading|}}}{{{2nd_reading|}}}{{{3rd_reading|}}}|Legislative history}} |label31 = {{#if:{{{enacted_by2|}}}|[[Bill (proposed law)|Bill]] introduced in the {{{enacted_by}}}|[[Bill (proposed law)|Bill]]}} |data31 = {{{bill|}}} |label32 = Bill citation |data32 = {{{bill_citation|}}} |label33 = Introduced on |data33 = {{{bill_date|}}} |label34 = Introduced by |data34 = {{{introduced_by|}}} |label35 = [[Reading (legislature)#First reading|First reading]] |data35 = {{{1st_reading|}}} |label36 = [[Reading (legislature)#Second reading|Second reading]] |data36 = {{{2nd_reading|}}} |label37 = [[Reading (legislature)#Third reading|Third reading]] |data37 = {{{3rd_reading|}}} |label38 = [[Conference committee]] bill passed |data38 = {{{conf_committee_passed|}}} |label39 = Nominated by |data39 = {{{nominated_by|}}} |label40 = Bill introduced in the {{{enacted_by2}}} |data40 = {{{bill2|}}} |label41 = Bill citation |data41 = {{{bill_citation2|}}} |label42 = Bill published on |data42 = {{{bill_date2|}}} |label43 = Introduced by |data43 = {{{introduced_by2|}}} |label44 = Voting began |data44 = {{{vote_begin|}}} |label45 = Voting concluded |data45 = {{{vote_end|}}} |label46 = Required majority |data46 = {{{required_majority|}}} |label47 = Vote results |data47 = {{{votes|}}} |label48 = Conference committee bill passed |data48 = {{{conf_committee_passed2|}}} |label49 = Approved by Cabinet |data49 = {{{approved_by_cabinet|}}} |label50 = Date passed by conference committee |data50 = {{{date_conf_committee|}}} |label51 = [[White paper#Government white papers|White paper]] |data51 = {{{white_paper|}}} |header60 = {{#if:{{{amendments|}}}|Amendments}} |data61 = {{{amendments|}}} |header62 = {{#if:{{{repeals|}}}|Repealing legislation}} |data63 = {{{repeals|{{{repealing_legislation|}}}}}} |header64 = {{#if:{{{related|{{{related_legislation|}}}}}}|Related legislation}} |data65 = {{{related|{{{related_legislation|}}}}}} |header66 = {{#if:{{{summary|}}}|Summary}} |data67 = {{{summary|}}} |header68 = {{#if:{{{keywords|}}}|Keywords}} |data69 = {{{keywords|}}} | header70 = {{#if:{{{original_text|}}}|[[{{{original_text|}}}|Text as originally enacted]]}} |belowstyle = background-color:{{#switch:{{lc:{{{status|}}}}} |pending = <nowiki>#</nowiki>FBEC5D |not passed = <nowiki>#</nowiki>FFCBDB |not yet in force |not fully in force = <nowiki>#</nowiki>FBEC5D |current |in force = <nowiki>#</nowiki>AAF0D1 |amended = <nowiki>#</nowiki>FFFFCC |original = <nowiki>#</nowiki>FFFFCC |expired = <nowiki>#</nowiki>B2BEB5 |spent = <nowiki>#</nowiki>B2BEB5 |superseded = <nowiki>#</nowiki>B2BEB5 |repealed = <nowiki>#</nowiki>B2BEB5 |passed = <nowiki>#</nowiki>AAF0D1 |#default = transparent; border-top:#aaa 1px solid; }}; |below = {{#if:{{{status|}}}|'''Status:''' {{#switch:{{lc:{{{status}}}}} |pending = Pending |not passed = Not passed |not yet in force = Not yet in force |not fully in force = Not fully in force |current = Current legislation |in force = In force |amended = Substantially amended |original = Legislation as passed |expired = Expired |spent = Spent enactment |superseded = Superseded |repealed = Repealed |passed = Passed |#default = Unknown }} }} }}<noinclude> {{Documentation}}<!--NOTE: Please insert categories in [[Template:Infobox legislation/doc]].--> </noinclude> 292f51596eed9786c5ff700d25348061a00ab3d9 Template:For loop 10 194 540 2018-07-23T22:55:18Z en>Pppery 0 Merge complete wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:For loop|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 12b7b7010fe32f888e21bcdfa6a904fc8a925437 Template:Infobox 10 17 29 2018-08-15T18:33:36Z en>Primefac 0 Undid revision 855063393 by [[Special:Contributions/Jdlrobson|Jdlrobson]] ([[User talk:Jdlrobson|talk]]) rather problematic change mentioned [[Template_talk:Infobox#Using_template_styles_to_reduce_technical_debt_inside_mobile_skin|on talk page]], reverting until it can be sorted wikitext text/x-wiki {{#invoke:Infobox|infobox}}<includeonly>{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Category:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}</includeonly><noinclude> {{documentation}} <!-- Categories go in the /doc subpage, and interwikis go in Wikidata. --> </noinclude> 817a9f5b6524eced06a57bd1d5fd7179f9369bf2 Template:Hidden end 10 14 23 2018-10-17T18:18:59Z en>Jonesey95 0 Fix [[Special:LintErrors|Linter]] errors wikitext text/x-wiki <noinclude>{{hatnote|Templates {{noredirect|Template:End hidden|End hidden}} and {{noredirect|Template:End hidden section|End hidden section}} redirect here.}}<div><div></noinclude><!-- --></div></div><!-- --><noinclude>{{Documentation|Template:Hidden begin/doc}}</noinclude> 2f3def935d96317afd11ab0e072d64fd91d9c575 Template:Template other 10 34 63 2018-12-16T22:06:25Z en>Amorymeltzer 0 Changed protection level for "[[Template:Template other]]": [[WP:High-risk templates|Highly visible template]]: Transclusion count has increased dramatically ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Template}} | template | other }} }} | template = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 06fb13d264df967b5232141067eb7d2b67372d76 Template:Mbox 10 22 39 2018-12-16T22:16:17Z en>Amorymeltzer 0 Changed protection level for "[[Template:Mbox]]": [[WP:High-risk templates|Highly visible template]]: 1M transclusions, used in the interface, cascade protected ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki {{#invoke:Message box|mbox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> c262e205f85f774a23f74119179ceea11751d68e Module:Color contrast 828 97 248 2019-01-06T22:38:25Z en>Johnuniq 0 fix unintended color2lum global error which is causing errors; clean whitespace Scribunto text/plain -- -- This module implements -- {{Color contrast ratio}} -- {{Greater color contrast ratio}} -- {{ColorToLum}} -- {{RGBColorToLum}} -- local p = {} local HTMLcolor = mw.loadData( 'Module:Color contrast/colors' ) local function sRGB (v) if (v <= 0.03928) then v = v / 12.92 else v = math.pow((v+0.055)/1.055, 2.4) end return v end local function rgbdec2lum(R, G, B) if ( 0 <= R and R < 256 and 0 <= G and G < 256 and 0 <= B and B < 256 ) then return 0.2126 * sRGB(R/255) + 0.7152 * sRGB(G/255) + 0.0722 * sRGB(B/255) else return '' end end local function hsl2lum(h, s, l) if ( 0 <= h and h < 360 and 0 <= s and s <= 1 and 0 <= l and l <= 1 ) then local c = (1 - math.abs(2*l - 1))*s local x = c*(1 - math.abs( math.fmod(h/60, 2) - 1) ) local m = l - c/2 local r, g, b = m, m, m if( 0 <= h and h < 60 ) then r = r + c g = g + x elseif( 60 <= h and h < 120 ) then r = r + x g = g + c elseif( 120 <= h and h < 180 ) then g = g + c b = b + x elseif( 180 <= h and h < 240 ) then g = g + x b = b + c elseif( 240 <= h and h < 300 ) then r = r + x b = b + c elseif( 300 <= h and h < 360 ) then r = r + c b = b + x end return rgbdec2lum(255*r, 255*g, 255*b) else return '' end end local function color2lum(c) if (c == nil) then return '' end -- html '#' entity c = c:gsub("&#35;", "#") -- whitespace c = c:match( '^%s*(.-)[%s;]*$' ) -- unstrip nowiki strip markers c = mw.text.unstripNoWiki(c) -- lowercase c = c:lower() -- first try to look it up local L = HTMLcolor[c] if (L ~= nil) then return L end -- convert from hsl if mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9%.]*[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local h, s, l = mw.ustring.match(c,'^hsl%([%s]*([0-9][0-9%.]*)[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return hsl2lum(tonumber(h), tonumber(s)/100, tonumber(l)/100) end -- convert from rgb if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*%)$') return rgbdec2lum(tonumber(R), tonumber(G), tonumber(B)) end -- convert from rgb percent if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return rgbdec2lum(255*tonumber(R)/100, 255*tonumber(G)/100, 255*tonumber(B)/100) end -- remove leading # (if there is one) and whitespace c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s]*$') -- split into rgb local cs = mw.text.split(c or '', '') if( #cs == 6 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2]) local G = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[4]) local B = 16*tonumber('0x' .. cs[5]) + tonumber('0x' .. cs[6]) return rgbdec2lum(R, G, B) elseif ( #cs == 3 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[1]) local G = 16*tonumber('0x' .. cs[2]) + tonumber('0x' .. cs[2]) local B = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[3]) return rgbdec2lum(R, G, B) end -- failure, return blank return '' end -- This exports the function for use in other modules. -- The colour is passed as a string. function p._lum(color) return color2lum(color) end function p._greatercontrast(args) local bias = tonumber(args['bias'] or '0') or 0 local css = (args['css'] and args['css'] ~= '') and true or false local v1 = color2lum(args[1] or '') local c2 = args[2] or '#FFFFFF' local v2 = color2lum(c2) local c3 = args[3] or '#000000' local v3 = color2lum(c3) local ratio1 = -1; local ratio2 = -1; if (type(v1) == 'number' and type(v2) == 'number') then ratio1 = (v2 + 0.05)/(v1 + 0.05) ratio1 = (ratio1 < 1) and 1/ratio1 or ratio1 end if (type(v1) == 'number' and type(v3) == 'number') then ratio2 = (v3 + 0.05)/(v1 + 0.05) ratio2 = (ratio2 < 1) and 1/ratio2 or ratio2 end if css then local c1 = args[1] or '' if mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c1 = '#' .. c1 end if mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c2 = '#' .. c2 end if mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c3 = '#' .. c3 end return 'background-color:' .. c1 .. '; color:' .. ((ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '') .. ';' end return (ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '' end function p._ratio(args) local v1 = color2lum(args[1]) local v2 = color2lum(args[2]) if (type(v1) == 'number' and type(v2) == 'number') then -- v1 should be the brighter of the two. if v2 > v1 then v1, v2 = v2, v1 end return (v1 + 0.05)/(v2 + 0.05) else return args['error'] or '?' end end function p._styleratio(args) local style = (args[1] or ''):lower() local bg, fg = 'white', 'black' local lum_bg, lum_fg = 1, 0 if args[2] then local lum = color2lum(args[2]) if lum ~= '' then bg, lum_bg = args[2], lum end end if args[3] then local lum = color2lum(args[3]) if lum ~= '' then fg, lum_fg = args[3], lum end end local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&#[Xx]23;', '#'), '&#35;', '#'), ';') for k = 1,#slist do local s = slist[k] local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' ) k = k or '' v = v or '' if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background%-color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_bg = v, lum end elseif (k:match('^[%s]*(color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_fg = v, lum end end end if lum_bg > lum_fg then return (lum_bg + 0.05)/(lum_fg + 0.05) else return (lum_fg + 0.05)/(lum_bg + 0.05) end end --[[ Use {{#invoke:Color contrast|somecolor}} directly or {{#invoke:Color contrast}} from a wrapper template. Parameters: -- |1= — required; A color to check. --]] function p.lum(frame) local color = frame.args[1] or frame:getParent().args[1] return p._lum(color) end function p.ratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._ratio(args) end function p.styleratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._styleratio(args) end function p.greatercontrast(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._greatercontrast(args) end return p 1e399769117591366a63f62996c9a407077cc711 Template:Country data Portugal 10 148 358 2019-01-12T11:28:17Z wikipedia>Cabayi 0 Per [[Special:Permalink/878009113#Template-protected edit request on 7 January 2019|request]] by [[User:Havsjö]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Portugal | flag alias = Flag of Portugal.svg | flag alias-1248 = PortugueseFlag1248.svg | flag alias-1385 = PortugueseFlag1385.svg | flag alias-1495 = Flag Portugal (1495).svg | flag alias-1578 = Flag Portugal (1578).svg | flag alias-1640 = Flag Portugal (1640).svg | flag alias-1707 = Flag Portugal (1707).svg | flag alias-1750 = Flag of Portugal (1750).svg | flag alias-1816 = Flag of the United Kingdom of Portugal, Brazil, and the Algarves.svg | flag alias-1830 = Flag Portugal (1830).svg | flag alias-civil = Flag Portugal sea (1830).svg | flag alias-air force=Portugal Air force fin flash.svg | flag alias-army = Military flag of Portugal.svg | link alias-air force = Portuguese Air Force | link alias-army = Portuguese Army | link alias-naval = Portuguese Navy | flag alias-navy=Naval Jack of Portugal.svg | link alias-navy = Portuguese Navy | flag alias-marines=Naval Jack of Portugal.svg | link alias-marines=Portuguese Marine Corps | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1248 | var2 = 1385 | var3 = 1495 | var4 = 1578 | var5 = 1640 | var6 = 1707 | var7 = 1750 | var8 = 1816 | var9 = 1830 | var13 = civil | redir1 = PRT | redir2 = POR | related1 = Portuguese Empire </noinclude> }} 208ba0708db45e46bb27b8b9f46d8c0b7b4bb9ed Template:Country data Bosnia and Herzegovina 10 133 328 2019-01-17T13:34:43Z wikipedia>SiBr4 0 Removed WFB flags per edit request wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Bosnia and Herzegovina | flag alias = Flag of Bosnia and Herzegovina.svg | flag alias-1992 = Flag of Bosnia and Herzegovina (1992–1998).svg | link alias-army = Bosnian Ground Forces | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1992 | redir1 = BIH | redir2 = Bosnia-Herzegovina | related1 = SR Bosnia and Herzegovina | related2 = Republika Srpska | related3 = Federation of Bosnia and Herzegovina </noinclude> }} cbecdd0b7dbc4b5254ec8654d57eaa2eb15a03bc Module:Color contrast/colors 828 98 250 2019-01-24T12:30:11Z en>Galobtter 0 Changed protection level for "[[Module:Color contrast/colors]]": [[WP:High-risk templates|High-risk Lua module]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) Scribunto text/plain return { aliceblue = 0.92880068253475, antiquewhite = 0.84646951707754, aqua = 0.7874, aquamarine = 0.8078549208338, azure = 0.97265264954166, beige = 0.8988459998705, bisque = 0.80732327372979, black = 0, blanchedalmond = 0.85084439608156, blue = 0.0722, blueviolet = 0.12622014321946, brown = 0.098224287876511, burlywood = 0.51559844533893, cadetblue = 0.29424681085422, chartreuse = 0.76032025902623, chocolate = 0.23898526114557, coral = 0.37017930872924, cornflowerblue = 0.30318641994179, cornsilk = 0.93562110372965, crimson = 0.16042199953026, cyan = 0.7874, darkblue = 0.018640801980939, darkcyan = 0.20329317839046, darkgoldenrod = 0.27264703559993, darkgray = 0.39675523072563, darkgreen = 0.091143429047575, darkgrey = 0.39675523072563, darkkhaki = 0.45747326349994, darkmagenta = 0.07353047651207, darkolivegreen = 0.12651920884889, darkorange = 0.40016167026524, darkorchid = 0.13413142174857, darkred = 0.054889674531132, darksalmon = 0.40541471563381, darkseagreen = 0.43789249325969, darkslateblue = 0.065792846227988, darkslategray = 0.067608151928044, darkslategrey = 0.067608151928044, darkturquoise = 0.4874606277449, darkviolet = 0.10999048339343, deeppink = 0.23866895828276, deepskyblue = 0.44481603395575, dimgray = 0.14126329114027, dimgrey = 0.14126329114027, dodgerblue = 0.27442536991456, firebrick = 0.10724525535015, floralwhite = 0.95922484825004, forestgreen = 0.18920812076002, fuchsia = 0.2848, gainsboro = 0.71569350050648, ghostwhite = 0.94311261886323, gold = 0.69860877428159, goldenrod = 0.41919977809569, gray = 0.2158605001139, green = 0.15438342968146, greenyellow = 0.80609472611453, grey = 0.2158605001139, honeydew = 0.96336535554782, hotpink = 0.34658438169715, indianred = 0.21406134963884, indigo = 0.03107561486337, ivory = 0.99071270600615, khaki = 0.77012343394121, lavender = 0.80318750514521, lavenderblush = 0.90172748631046, lawngreen = 0.73905893124963, lemonchiffon = 0.94038992245622, lightblue = 0.63709141280807, lightcoral = 0.35522120733135, lightcyan = 0.94587293494829, lightgoldenrodyellow = 0.93348351018297, lightgray = 0.65140563741982, lightgreen = 0.69091979956865, lightgrey = 0.65140563741982, lightpink = 0.58566152734898, lightsalmon = 0.4780675225206, lightseagreen = 0.35050145117042, lightskyblue = 0.56195637618331, lightslategray = 0.23830165007287, lightslategrey = 0.23830165007287, lightsteelblue = 0.53983888284666, lightyellow = 0.98161818392882, lime = 0.7152, limegreen = 0.44571042246098, linen = 0.88357340984379, magenta = 0.2848, maroon = 0.045891942324215, mediumaquamarine = 0.49389703310801, mediumblue = 0.044077780212328, mediumorchid = 0.21639251153773, mediumpurple = 0.22905858091648, mediumseagreen = 0.34393112338131, mediumslateblue = 0.20284629471622, mediumspringgreen = 0.70704308194184, mediumturquoise = 0.5133827926448, mediumvioletred = 0.14371899849357, midnightblue = 0.02071786635086, mintcream = 0.97834604947588, mistyrose = 0.82183047859185, moccasin = 0.80083000991567, navajowhite = 0.76519682342785, navy = 0.015585128108224, oldlace = 0.91900633405549, olive = 0.20027537200568, olivedrab = 0.22593150951929, orange = 0.4817026703631, orangered = 0.25516243753416, orchid = 0.31348806761439, palegoldenrod = 0.78792647887614, palegreen = 0.77936759006353, paleturquoise = 0.76436077921714, palevioletred = 0.28754994117889, papayawhip = 0.87797100199835, peachpuff = 0.74905589878251, peru = 0.30113074877936, pink = 0.63271070702466, plum = 0.45734221587969, powderblue = 0.68254586500605, purple = 0.061477070432439, rebeccapurple = 0.07492341159447, red = 0.2126, rosybrown = 0.32319457649407, royalblue = 0.16663210743188, saddlebrown = 0.097922285020521, salmon = 0.36977241527596, sandybrown = 0.46628543696283, seagreen = 0.19734199706275, seashell = 0.92737862206922, sienna = 0.13697631337098, silver = 0.52711512570581, skyblue = 0.55291668518184, slateblue = 0.14784278062136, slategray = 0.20896704076536, slategrey = 0.20896704076536, snow = 0.96533341834849, springgreen = 0.73052306068529, steelblue = 0.20562642207625, tan = 0.48237604163921, teal = 0.16996855778968, thistle = 0.56818401093733, tomato = 0.30638612719415, turquoise = 0.5895536427578, violet = 0.40315452986676, wheat = 0.74909702820482, white = 1, whitesmoke = 0.91309865179342, yellow = 0.9278, yellowgreen = 0.50762957208707, } 6ae47fdb24de4eed5ec26d203faf5341a388987b Template:Mono/styles.css 10 24 43 2019-03-04T00:01:15Z en>Pppery 0 Adding protection template text text/plain /* {{pp-template}} */ .monospaced { /* "monospace, monospace" per [[WP:MONO]] */ font-family: monospace, monospace; } cadfc2ad2e42cde230abf3e74ad418f7c4c71ab4 Template:Lua 10 20 35 2019-03-20T22:04:45Z en>RMCD bot 0 Removing notice of move discussion wikitext text/x-wiki <includeonly>{{#invoke:Lua banner|main}}</includeonly><noinclude> {{Lua|Module:Lua banner}} {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> dba3962144dacd289dbc34f50fbe0a7bf6d7f2f7 Template:Clc 10 81 214 2019-04-24T04:30:59Z en>JJMC89 0 actual template is in the category wikitext text/x-wiki #REDIRECT [[Template:Category link with count]] 02280e2ab57b544236e11f913e3759c5781ca9d5 Template:Microformat message 10 85 222 2019-05-11T04:30:34Z en>AlanM1 0 Rm extra word wikitext text/x-wiki The [[Help:HTML in wikitext|HTML mark-up]] produced by this template includes {{#if:{{{type|}}} |{{{type}}} |an [[{{{format}}} microformat]]}} that makes {{{data}}} readily [[Parsing|parsable]] by computer programs. This aids tasks such as the cataloguing of articles and maintenance of databases. For more information about the use of microformats on Wikipedia, please visit [[Wikipedia:WikiProject Microformats|the Microformat WikiProject]].<!-- -->{{#if:{{{subtemplates<includeonly>|</includeonly>}}} | <div style="margin-top:0.5em;margin-bottom:0.65em;"> ; {{big|Subtemplates}} {{{subtemplates}}} '''''Please do not remove instances of these subtemplates.''''' </div>}}<!-- -->{{#if:{{{subsection1|}}} | <div style="margin-top:0.5em;margin-bottom:0.65em;"><!--(newline in case subsection begins with heading:)--> {{{subsection1}}} </div>}}<!-- -->{{#if:{{{1<includeonly>|</includeonly>}}} <!--(i.e. if at least one unnamed parameter supplied:)--> | <div style="margin-top:0.5em;margin-bottom:0.65em;"> ; {{big|Classes used}} The [[HTML attribute|HTML class]]es of this microformat include: : {{hlist |item_style=font-size:110%;{{{itemstyle|}}} |{{{1}}} |{{{2<includeonly>|</includeonly>}}} |{{{3|<noinclude>{{nobold|……}}</noinclude>}}} |{{{4|}}} |{{{5|}}} |{{{6|}}} |{{{7|}}} |{{{8|}}} |{{{9|}}} |{{{10|}}} |{{{11|}}} |{{{12|}}} |{{{13|}}} |{{{14|}}} |{{{15|}}} |{{{16|}}} |{{{17|}}} |{{{18|}}} |{{{19|}}} |{{{20|}}} }} </div> {{longitem|style=line-height:1.3em|'''''Please do not rename or remove these classes{{#if:{{{nocollapse<includeonly>|</includeonly>}}} |<br/>nor collapse nested elements which use them}}.'''''}}<!-- -->}}<!--(end #if:[1])--><noinclude> {{Documentation}} </noinclude> bfb8605b8917ea8a940634ca79c9c1a4c9c50ef0 Template:Font color/doc 10 70 141 2019-06-09T17:11:48Z en>Unknown user 0 Created page with "This is the {{[[Template:Font color|font color]]}} template. == Example == For example, <code><nowiki>{{font color|orange|This is a message.}}</nowiki></code> makes this:<br>..." wikitext text/x-wiki This is the {{[[Template:Font color|font color]]}} template. == Example == For example, <code><nowiki>{{font color|orange|This is a message.}}</nowiki></code> makes this:<br> {{font color|orange|This is a message.}} f9705e846565d35f0c9cdae76634b19d378fab5c Template:Ubl 10 163 388 2019-09-11T19:30:27Z wikipedia>Paine Ellsworth 0 convert to shell template wikitext text/x-wiki #REDIRECT [[Template:Unbulleted list]] {{Rcat shell| {{R from template shortcut}} }} 6b250cba5f224bbaa761c7bdc41463e1cef32a3d Template:Singapore legislation 10 29 53 2019-10-10T02:25:07Z en>Horserice 0 omit space wikitext text/x-wiki {{#if:{{{title|}}} |{{#if:{{{titlelink|}}} |[[{{{titlelink}}}|{{#switch:{{{title}}} |Independence of Singapore Agreement = {{{title}}} 1965 |Republic of Singapore Independence Act = {{{title}}} 1965 |Territorial Waters Jurisdiction Act = {{{title}}} 1878 |Marine Conventions Act = {{{title}}} 1911 |Straits Settlements and Johore Territorial Waters (Agreement) Act = {{{title}}} 1928 |#default = {{{title}}}{{#ifeq:{{{sltype|}}} | S | &#32;{{{year}}} }} {{#if:{{{1|{{{cap|}}} }}}{{{sltype|}}} |{{#ifeq:{{{1|{{{cap|}}} }}} | new | &#32;{{{year}}} }} |{{#if:{{{year|}}} | &#32;{{{year}}} }} }} }}]]&#32;( |{{#switch:{{ucfirst:{{{title}}} }} |Constitution = [[Constitution of Singapore|{{#ifeq:{{lc:{{{abbr|}}}}}|on|Singapore Constitution|Constitution of the Republic of Singapore}}]] |Independence of Singapore Agreement = [[Independence of Singapore Agreement 1965]] |Republic of Singapore Independence Act = {{{title}}} 1965 |Territorial Waters Jurisdiction Act = {{{title}}} 1878 |Marine Conventions Act = {{{title}}} 1911 |Straits Settlements and Johore Territorial Waters (Agreement) Act = {{{title}}} 1928 |#default = {{{title}}}{{#ifeq:{{{sltype|}}} | S | &#32;{{{year}}} }} {{#if:{{{1|{{{cap|}}} }}}{{{sltype|}}} |{{#ifeq:{{{1|{{{cap|}}} }}} | new | &#32;{{{year}}} }} |{{#if:{{{year|}}} | &#32;{{{year}}} }} }} }}&#32;( }} }}{{#if:{{{sltype|}}} |{{#if:{{{archiveurl|}}} | [{{{archiveurl}}} | {{#if:{{{url|}}} | [{{{url}}} }} }} {{#switch:{{{sltype}}} |GN = {{#ifeq:{{lc:{{{abbr|}}} }} | off | Gazette Notification | G.N.}} No.&nbsp;{{{no}}}/{{{year}}} |S = S&nbsp;{{{no}}}/{{{year}}} |N |O |R |Rg = {{#if:{{{1|{{{cap|}}} }}}|Cap.&nbsp;{{{1|{{{cap}}}}}},&#32;}}{{{sltype}}}&nbsp;{{{no}}}, {{{2|{{{ed|{{{year}}}}}}}}} Rev. Ed. }}{{#if:{{{url|}}} | ] }} |{{#if:{{{no|}}} |{{#if:{{{url|}}} |[{{#if:{{{archiveurl|}}} | {{{archiverurl}}} | {{{url}}} }} No.&nbsp;{{{no}}} of {{{year}}}] |{{#ifeq:{{lc:{{{1|{{{cap}}} }}} }} | new | [{{Singapore legislation/index|cap={{{1|{{{cap}}} }}}|no={{{no}}}|year={{{year}}} }} No.&nbsp;{{{no}}} of {{{year}}}] |No.&nbsp;{{{no}}} of {{{year}}} }} }} |{{#if:{{{url|}}} |[{{#if:{{{archiveurl|}}} | {{{archiverurl}}} | {{{url}}} }} Cap.&nbsp;{{{1|{{{cap}}} }}}, {{{2|{{{ed}}}}}}&nbsp;Rev. Ed.] |{{#ifeq:{{lc:{{{lk}}} }} | off |{{#ifeq:{{{title|}}} | Constitution | {{{rep}}} Reprint | Cap.&nbsp;{{{1|{{{cap}}} }}}, {{{2|{{{ed}}}}}}&nbsp;Rev. Ed.}} |[{{Singapore legislation/index | cap = {{#switch:{{ucfirst:{{{title|}}} }} |Constitution = CONST |Independence of Singapore Agreement = INDEP |Republic of Singapore Independence Act = RSI |Territorial Waters Jurisdiction Act = IA1 |Straits Settlements and Johore Territorial Waters (Agreement) Act = IA2 |Marine Conventions Act = IA3 |#default = {{{1|{{{cap}}} }}} }} }} {{#switch:{{ucfirst:{{{title|}}} }} |Constitution = {{#if:{{{2|{{{ed|}}} }}} | {{{2|{{{ed}}}}}} Rev. Ed.,&#32;}}{{{rep}}} Reprint |Independence of Singapore Agreement = 1985 Rev. Ed. |Republic of Singapore Independence Act = No.&nbsp;9 of 1965 |Territorial Waters Jurisdiction Act = 41 & 42 Vict., c.&nbsp;73 |Straits Settlements and Johore Territorial Waters (Agreement) Act = 18 & 19 Geo. V, c.&nbsp;23 |Marine Conventions Act = 1 & 2 Geo. V, c.&nbsp;57 |#default = Cap.&nbsp;{{{1|{{{cap}}} }}} }}{{#if:{{{2|{{{ed|}}} }}} |{{#ifeq:{{{title}}} | Independence of Singapore Agreement |<!--Display nothing--> |{{#ifeq:{{{title}}} | Constitution | | ,&#32;{{{2|{{{ed}}}}}}&nbsp;Rev. Ed.}} }} }}] }} }} }} }}{{#if:{{{title|}}} | ) }}{{#if:{{{archiveurl|}}} | , archived from [{{{url}}} the original] on {{date | {{{archivedate}}} | {{{dateformat|}}} }} }}<noinclude><!--NOTE: Please place categories in [[Template:Singapore Statute/doc]].-->{{Documentation}}</noinclude> ae6d224f482ddb62e1b7d61ce0d7f9f667de1114 Template:Mono 10 23 41 2019-10-13T01:15:06Z en>Izno 0 implement ifsubst wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>ifsubst|1=|2=<templatestyles src="Mono/styles.css" />}}<span class="monospaced">{{{2|{{{1}}}}}}</span><noinclude> {{Documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 800f06823c02b03f8b9cf1e245ad8c4829cfe931 Template:Flag/core 10 158 378 2019-10-22T23:19:32Z wikipedia>S.A. Julio 0 /* top */adjusting for improved method to define custom flag sizes wikitext text/x-wiki <span class="flagicon">[[File:{{{flag alias-{{{variant}}}|{{#if:{{{flag alias|}}}|{{{flag alias}}}|Flag placeholder.svg}}}}}|{{#if:{{{size|}}}|{{{size}}}|{{{size flag alias-{{{variant}}}|{{#if:{{{variant|}}}|23x15px|{{{size flag alias|23x15px}}}}}}}}}}|{{{border-{{{variant}}}|{{{border|border}}}}}} |alt=|link=]]&nbsp;{{#switch:{{{flag alias}}}|Flag of Switzerland.svg|Flag of the Vatican City.svg=&nbsp;}}{{#ifeq:{{{alias}}}|Nepal|&nbsp;&nbsp;}}</span>[[{{{alias}}}|{{{name}}}]]<noinclude>{{documentation}}</noinclude> bbe353c6ea148b8b0752e512df22ad44acee5e29 Template:Unbulleted list 10 164 390 2019-12-09T17:31:16Z wikipedia>Jonesey95 0 Undid revision 929522913 by [[Special:Contributions/MSGJ|MSGJ]] ([[User talk:MSGJ|talk]]). Reverted, as this change has been shown to have bugs. Discussion continues on talk page. wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|unbulleted}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 89815a491d3e05b20af446e34cda13f13c25fb4f Module:Parameter names example 828 58 111 2020-03-26T04:07:47Z en>Andrybak 0 add popular variants of demonstration purposes parameters: nocat=yes, categories=no, and demo=yes Scribunto text/plain -- This module implements {{parameter names example}}. local p = {} local function makeParam(s) local lb = '&#123;' local rb = '&#125;' return lb:rep(3) .. s .. rb:rep(3) end local function italicize(s) return "''" .. s .. "''" end local function plain(s) return s end function p._main(args, frame) -- Find how we want to format the arguments to the template. local formatFunc if args._display == 'italics' or args._display == 'italic' then formatFunc = italicize elseif args._display == 'plain' then formatFunc = plain else formatFunc = makeParam end -- Build the table of template arguments. local targs = {} for k, v in pairs(args) do if type(k) == 'number' then targs[v] = formatFunc(v) elseif not k:find('^_') then targs[k] = v end end targs['nocat'] = 'yes'; targs['categories'] = 'no'; targs['demo'] = 'yes'; -- Find the template name. local template if args._template then template = args._template else local currentTitle = mw.title.getCurrentTitle() if currentTitle.prefixedText:find('/sandbox$') then template = currentTitle.prefixedText else template = currentTitle.basePageTitle.prefixedText end end -- Call the template with the arguments. frame = frame or mw.getCurrentFrame() local success, result = pcall( frame.expandTemplate, frame, {title = template, args = targs} ) if success then return result else return '' end end function p.main(frame) local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Parameter names example' }) return p._main(args, frame) end return p 576eb8298850f4e4e62105ac740df295b7b7eb9e Template:Ombox 10 109 276 2020-04-01T06:12:36Z en>MusikAnimal 0 1 revision imported wikitext text/x-wiki {{#invoke:Message box|ombox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 0e54065432d540737b9e56c4e3a8e7f74d4534ea Template:Para 10 25 45 2020-04-01T06:12:37Z en>MusikAnimal 0 1 revision imported wikitext text/x-wiki <code class="nowrap" style="{{SAFESUBST:<noinclude />#if:{{{plain|}}}|border: none; background-color: inherit;}} {{SAFESUBST:<noinclude />#if:{{{plain|}}}{{{mxt|}}}{{{green|}}}{{{!mxt|}}}{{{red|}}}|color: {{SAFESUBST:<noinclude />#if:{{{mxt|}}}{{{green|}}}|#006400|{{SAFESUBST:<noinclude />#if:{{{!mxt|}}}{{{red|}}}|#8B0000|inherit}}}};}} {{SAFESUBST:<noinclude />#if:{{{style|}}}|{{{style}}}}}">&#124;{{SAFESUBST:<noinclude />#if:{{{1|}}}|{{{1}}}&#61;}}{{{2|}}}</code><noinclude> {{Documentation}} <!--Categories and interwikis go near the bottom of the /doc subpage.--> </noinclude> 96ef5dce1fb3a5c1b6648eac125a2496944a852e Module:Arguments 828 40 75 2020-04-01T06:12:40Z en>MusikAnimal 0 1 revision imported Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 145 75 2020-08-22T23:41:54Z en>Dmehus 0 6 revisions imported from [[:templatewiki:Module:Arguments]]: [[Special:Diff/121001|Requested]]. Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 175 145 2020-09-18T09:09:31Z en>Anaaxes 0 1 revision imported Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Module:Yesno 828 63 121 2020-04-01T06:27:55Z en>MusikAnimal 0 Undid revision 948472533 by [[Special:Contributions/w>Vogone|w>Vogone]] ([[User talk:w>Vogone|talk]]) Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end f767643e7d12126d020d88d662a3dd057817b9dc 157 121 2020-08-22T23:42:02Z en>Dmehus 0 7 revisions imported from [[:templatewiki:Module:Yesno]]: [[Special:Diff/121001|Requested]]. Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end f767643e7d12126d020d88d662a3dd057817b9dc Module:No globals 828 57 109 2020-04-01T06:28:55Z en>MusikAnimal 0 Undid revision 948472525 by [[Special:Contributions/w>DiBabelYurikBot|w>DiBabelYurikBot]] ([[User talk:w>DiBabelYurikBot|talk]]) Scribunto text/plain local mt = getmetatable(_G) or {} function mt.__index (t, k) if k ~= 'arg' then error('Tried to read nil global ' .. tostring(k), 2) end return nil end function mt.__newindex(t, k, v) if k ~= 'arg' then error('Tried to write global ' .. tostring(k), 2) end rawset(t, k, v) end setmetatable(_G, mt) 8ce3969f7d53b08bd00dabe4cc9780bc6afd412a 155 109 2020-08-22T23:41:59Z en>Dmehus 0 7 revisions imported from [[:templatewiki:Module:No_globals]]: [[Special:Diff/121001|Requested]]. Scribunto text/plain local mt = getmetatable(_G) or {} function mt.__index (t, k) if k ~= 'arg' then error('Tried to read nil global ' .. tostring(k), 2) end return nil end function mt.__newindex(t, k, v) if k ~= 'arg' then error('Tried to write global ' .. tostring(k), 2) end rawset(t, k, v) end setmetatable(_G, mt) 8ce3969f7d53b08bd00dabe4cc9780bc6afd412a Module:File link 828 48 91 2020-04-01T06:31:54Z en>MusikAnimal 0 Undid revision 948472508 by [[Special:Contributions/w>IPad365|w>IPad365]] ([[User talk:w>IPad365|talk]]) Scribunto text/plain -- This module provides a library for formatting file wikilinks. local yesno = require('Module:Yesno') local checkType = require('libraryUtil').checkType local p = {} function p._main(args) checkType('_main', 1, args, 'table') -- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our -- own function to get the right error level. local function checkArg(key, val, level) if type(val) ~= 'string' then error(string.format( "type error in '%s' parameter of '_main' (expected string, got %s)", key, type(val) ), level) end end local ret = {} -- Adds a positional parameter to the buffer. local function addPositional(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = val end -- Adds a named parameter to the buffer. We assume that the parameter name -- is the same as the argument key. local function addNamed(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = key .. '=' .. val end -- Filename checkArg('file', args.file, 3) ret[#ret + 1] = 'File:' .. args.file -- Format if args.format then checkArg('format', args.format) if args.formatfile then checkArg('formatfile', args.formatfile) ret[#ret + 1] = args.format .. '=' .. args.formatfile else ret[#ret + 1] = args.format end end -- Border if yesno(args.border) then ret[#ret + 1] = 'border' end addPositional('location') addPositional('alignment') addPositional('size') addNamed('upright') addNamed('link') addNamed('alt') addNamed('page') addNamed('class') addNamed('lang') addNamed('start') addNamed('end') addNamed('thumbtime') addPositional('caption') return string.format('[[%s]]', table.concat(ret, '|')) end function p.main(frame) local origArgs = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:File link' }) if not origArgs.file then error("'file' parameter missing from [[Template:File link]]", 0) end -- Copy the arguments that were passed to a new table to avoid looking up -- every possible parameter in the frame object. local args = {} for k, v in pairs(origArgs) do -- Make _BLANK a special argument to add a blank parameter. For use in -- conditional templates etc. it is useful for blank arguments to be -- ignored, but we still need a way to specify them so that we can do -- things like [[File:Example.png|link=]]. if v == '_BLANK' then v = '' end args[k] = v end return p._main(args) end return p 66925f088d11530f2482f04181a3baaaa0ad3d0c Template:Sandbox other 10 28 51 2020-04-03T00:08:09Z en>Evad37 0 Also match subpage names beginning with "sandbox", per [[Template_talk:Sandbox_other#Template-protected_edit_request_on_28_March_2020|edit request]] wikitext text/x-wiki {{#if:{{#ifeq:{{#invoke:String|sublength|s={{SUBPAGENAME}}|i=0|len=7}}|sandbox|1}}{{#ifeq:{{SUBPAGENAME}}|doc|1}}{{#invoke:String|match|{{PAGENAME}}|/sandbox/styles.css$|plain=false|nomatch=}}|{{{1|}}}|{{{2|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> 91e4ae891d6b791615152c1fbc971414961ba872 Module:For loop 828 195 542 2020-05-22T07:38:08Z en>Johnuniq 0 require [[Module:Template invocation]] only if required (see [[Template talk:Post-nominals#Use of Module:Template_invocation]]); clean whitespace, variables Scribunto text/plain -- This module implements {{for loop}}. local getArgs = require('Module:Arguments').getArgs local yesno = require('Module:Yesno') local p = {} function p.main(frame) local args = getArgs(frame, { trim = false, removeBlanks = false }) return p._main(args) end function p._main(args) local template = args['call'] or 'void' local calltemplates = yesno(args.substall or "", true) or not mw.isSubsting() local variableParam = args.pv variableParam = tonumber(variableParam) or variableParam or 1 -- fix for positional parameters local variableValPrefix = args.prefix or '' local variableValPostfix = args.postfix or '' local sep = args[1] or '' local constantArgs = p.getConstants(args) local variableVals = p.getVariableVals(args) local result = '' local addSeparator = false; for _, v in ipairs(variableVals) do v = mw.text.trim(v) if #v > 0 or not yesno(args.skipBlanks) then if addSeparator then result = result .. sep end addSeparator = true; local targs = constantArgs targs[variableParam] = variableValPrefix .. v .. variableValPostfix if calltemplates then local output = p.callTemplate(template, targs) if #mw.text.trim(output) == 0 then addSeparator = false end result = result .. output else local makeTemplate = require('Module:Template invocation').invocation result = result .. makeTemplate(template, targs) end end end return result end function p.getConstants(args) local constantArgNums = p.getArgNums(args, 'pc', 'n') local constantArgs = {} for _, num in ipairs(constantArgNums) do local keyArg = 'pc' .. tostring(num) .. 'n' local valArg = 'pc' .. tostring(num) .. 'v' local key = args[keyArg] key = tonumber(key) or key local value = args[valArg] constantArgs[key] = value end return constantArgs end function p.getVariableVals(args) local variableVals = {} if args.start or args.stop or args.by then if args[2] then error("Both start/stop/by and numbered parameters specified") end local start = tonumber(args.start or 1) local stop = tonumber(args.stop or 1) local by = tonumber(args.by or 1) for i = start, stop, by do variableVals [#variableVals + 1] = i end else for i, v in ipairs(args) do if i ~= 1 then variableVals[i - 1] = v end end end return variableVals end function p.getArgNums(args, prefix, suffix) -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix and suffix. local nums = {} local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' for k, _ in pairs(args) do local num = tostring(k):match(pattern) if num then nums[#nums + 1] = tonumber(num) end end table.sort(nums) return nums end function p.callTemplate(template, targs) return mw.getCurrentFrame():expandTemplate{title = template, args = targs} end return p 4ed4682b1fd3fbf2bf0836b46dd19bc0363d40e2 Template:Singapore legislation/index 10 30 55 2020-05-31T19:09:09Z en>Robertsky 0 add POFMA wikitext text/x-wiki <includeonly>https://sso.agc.gov.sg/{{#switch:{{{cap|}}} |1 = Act/IA1965 |1 of 2017 = Act/MA2017 |10 = Act/AA2001 |10 of 2018= Act/ESBA2018 |100 = Act/ESA1924 |102 = Act/ELA1968 |103 = Act/EA1968 |105 = Act/FSA1965 |106 = Act/FA1881 |107 = Act/FA1981 |108 = Act/FCA1967 |109 = Act/FPA1966 |109A = Act/FSA1993 |11 = Act/AIIDA1968 |11 of 2017= Act/SA2017 |11 of 2019= Act/SFAA2019 |110 = Act/FAA2001 |111 = Act/FA1966 |111A = Act/FLPA2012 |112 = Act/FRA1875 |113 = Act/FA1872 |114 = Act/FTZA1966 |115 = Act/FCA1959 |116A = Act/GA2001 |117 = Act/GCA1973 |117A = Act/GSTA1993 |117C = Act/GSTVFA2012 |118 = Act/GCA1966 |12 = Act/AA1991 |12 of 2016= Act/SA2016 |12 of 2017= Act/SSFY2016A2017 |12 of 2019= Act/SA2019 |120 = Act/GPA1997 |121 = Act/GPA1956 |121A = Act/GSA1992 |122 = Act/GIA1934 |122A = Act/HWCEITA1997 |122B = Act/HPBA2001 |122C = Act/HSAA2001 |122D = Act/HPA2007 |123 = Act/HCAJA1961 |124 = Act/HAPAIAA1978 |125 = Act/HPA1969 |126 = Act/HA1998 |126A = Act/HAA1988 |126B = Act/HAUSSA2001 |126C = Act/HTA2010 |127 = Act/HA1954 |128 = Act/HHSCA1947 |129 = Act/HDA1959 |13 = Act/AEA1913 |13 of 2016= Act/FSFY2015A2016 |13 of 2018= Act/SA2018 |13 of 2019= Act/SSFY2018A2019 |130 = Act/HDCLA1965 |131 = Act/HUDCHEA1984 |131A = Act/HOTA1987 |131B = Act/HCOPPA2004 |132 = Act/HCFA1947 |133 = Act/IA1959 |134 = Act/ITA1947 |135 = Act/IAA1941 |136 = Act/IRA1960 |137 = Act/IDA1976 |138 = Act/IFPA1966 |138A = Act/IRASA1992 |139 = Act/IA1921 |139A = Act/IA2007 |14 = Act/AOA1973 |14 of 2018= Act/SSFY2017A2018 |140 = Act/IPOSA2001 |141 = Act/ISEASYIIA1968 |141A = Act/ITEA1992 |142 = Act/IA1966 |143 = Act/ISA1960 |143A = Act/IAA1994 |143C = Act/ICAA2010 |144 = Act/IFCA1968 |144A = Act/IDAA2002 |144B = Act/IIAEA2009 |145 = Act/IOIPA1948 |145A = Act/IPPA2008 |146 = Act/ISA1967 |146A = Act/ISA1987 |147 = Act/JRA1994 |149 = Act/JPRRA1960 |15 = Act/ADBA1966 |150 = Act/JTCA1968 |151 = Act/KA1961 |152 = Act/LAA1966 |155 = Act/LRCA1940 |156 = Act/LSA1991 |157 = Act/LTA1993 |158 = Act/LTSA1967 |158A = Act/LTASA1995 |159A = Act/LDICA1999 |15A = Act/AIIBA2015 |16 = Act/AA1906 |160 = Act/LAAA1995 |161 = Act/LPA1966 |162 = Act/LA1934 |162A = Act/LLEFA2001 |163 = Act/LA1959 |163A = Act/LLPA2005 |163B = Act/LPA2008 |164 = Act/LIBA1958 |165 = Act/LFRFHA1953 |167 = Act/LTBA1923 |167A = Act/MRHA1990 |167B = Act/MPA1995 |169 = Act/MOREA1975 |16A = Act/AGAFA2014 |17 = Act/AA1966 |17 of 2015= Act/TPTBSPA2015 |170 = Act/MRVA1929 |170A = Act/MPASA1996 |170B = Act/MOA2003 |170C = Act/MODA2004 |173A = Act/MECESA2000 |174 = Act/MRA1997 |175 = Act/MTERA1972 |176 = Act/MA1975 |177 = Act/MASA1955 |177A = Act/MCA2008 |178A = Act/MHCTA2008 |179 = Act/MSA1995 |179A = Act/MSCLCBOPA2008 |18 = Act/BA1959 |18 of 2019= Act/POFMA2019 |180 = Act/MSCLCOPA1998 |181 = Act/MA1970 |182 = Act/MMA1963 |183 = Act/MFIA1959 |184 = Act/MOPONA1906 |185 = Act/MDA1973 |186 = Act/MASA1970 |187 = Act/MRBA1979 |188 = Act/MA2008 |189 = Act/MVTPRCA1960 |19 = Act/BA1970 |19 of 2014= Act/GIA2014 |19 of 2016= Act/AJPA2016 |19 of 2017= Act/ECDCA2017 |19 of 2018= Act/CJRA2018 |190 = Act/MLMPSPA1973 |190A = Act/MACMA2000 |191 = Act/MBOA1960 |191A = Act/NPA1992 |192A = Act/NTUCA2005 |193A = Act/NACA1991 |194 = Act/NCCA1972 |195 = Act/NEAA2002 |195A = Act/NCSSA1992 |196 = Act/NECDA1949 |196A = Act/NHBA1993 |197 = Act/NLBA1995 |198A = Act/NPBA1996 |199A = Act/NPFA2010 |2 = Act/AA2004 |2 of 2015 = Act/PA2015 |20 = Act/BA1995 |201 = Act/NRA1965 |201A = Act/NRFA2006 |201B = Act/NRDA2007 |202 = Act/NSEA1970 |204A = Act/NUSCA2005 |206 = Act/NPPA1974 |207 = Act/NAPA1967 |208 = Act/NPA1959 |209 = Act/NMA1999 |21 = Act/BA1960 |21 of 2012= Act/PPAA2012 |21 of 2016= Act/ECA2016 |21 of 2017= Act/TKWSFHTUDA2017 |211 = Act/ODA2000 |213 = Act/OSA1935 |213A = Act/OOA2007 |214 = Act/PPA1974 |215 = Act/PPSA1975 |216 = Act/PTA2005 |217 = Act/PPIPA1962 |218 = Act/PEA1954 |219 = Act/PPA1978 |22 = Act/BSDA1950 |22 of 2016= Act/IMDAA2016 |220 = Act/PA2007 |221 = Act/PA1994 |222A = Act/PSOA2006 |223 = Act/PTA1965 |224 = Act/PC1871 |224A = Act/PFA1995 |225 = Act/PA1956 |226 = Act/PEOA1976 |227 = Act/PAA1960 |228 = Act/PIEPA1941 |23 = Act/BEA1949 |23 of 2016= Act/GTAA2016 |23 of 2018= Act/CPA2018 |230 = Act/PRA2007 |231 = Act/PSSFNA2002 |232 = Act/PA1998 |232A = Act/PVPA2004 |234 = Act/PA1938 |235 = Act/PFA2004 |236 = Act/PDA2000 |237 = Act/POSBSTUDA1998 |237A = Act/PSA1999 |239 = Act/PMA2009 |24 = Act/BSA1886 |24 of 2014= Act/THPA2014 |24 of 2016= Act/SSAA2016 |240A = Act/PrEA1991 |241 = Act/PCA1960 |243 = Act/PPSA1990 |244 = Act/PCA1950 |247 = Act/PA1933 |247A = Act/PEA2009 |248 = Act/PHMCA1980 |24A = Act/BATA2005 |25 = Act/BSMA1998 |25 of 2017= Act/MSWRA2017 |250 = Act/PLA2011 |250A = Act/PSIA2007 |251 = Act/PAA1934 |252 = Act/POA1951 |253 = Act/PEA1991 |254 = Act/PTA1960 |256A = Act/PHA2014 |257 = Act/PEA1958 |257A = Act/POA2009 |259 = Act/PSCLSCA1956 |259A = Act/259A |259B = Act/PTCA1987 |26 = Act/BSAA1926 |26 of 2012= Act/PDPA2012 |26 of 2015= Act/OCA2015 |26 of 2018= Act/POSSPA2018 |260 = Act/PTA1915 |261 = Act/PUA2001 |262 = Act/RPA2007 |263 = Act/RA1905 |263A = Act/RTSA1995 |264 = Act/RECJA1921 |265 = Act/REFJA1959 |266 = Act/RDA2000 |267 = Act/RBDA1937 |268 = Act/RCA1949 |269 = Act/RDA1988 |27 = Act/BWAA1966 |27 of 2014= Act/FJA2014 |27 of 2017= Act/TSMRMA2017 |27 of 2018= Act/VAA2018 |270 = Act/RPA2002 |272A = Act/RIEA1995 |273 = Act/RRA1985 |274 = Act/RPA1976 |274A = Act/RRA1993 |275 = Act/RELA1983 |276 = Act/RTA1961 |277 = Act/RVSPA1960 |28 = Act/BA1994 |28 of 2015= Act/SSSA2015 |280 = Act/RIA1992 |281 = Act/SCPA1979 |282 = Act/SDA1914 |283 = Act/SFA1973 |283A = Act/SGUNCA1995 |284 = Act/SGQA1970 |284A = Act/SBIA1990 |285 = Act/SCPA1955 |286 = Act/ScCA1970 |288A = Act/SGDA2007 |289 = Act/SFA2001 |29 = Act/BCA1989 |29 of 2014= Act/BNRA2014 |29 of 2015= Act/HBRA2015 |290 = Act/SA1948 |291 = Act/SDCA1972 |292 = Act/SLA1963 |293 = Act/SEA1934 |294 = Act/SDA1999 |294A = Act/SALA1988 |294B = Act/SACA2013 |295 = Act/SAFA1972 |296 = Act/SAFNAA1959 |297A = Act/SBFA2001 |298 = Act/SCREA1975 |299A = Act/SEABA2003 |299B = Act/SITA2014 |2A = Act/ACRAA2004 |2B = Act/ASA2007 |3 = Act/AMLA1966 |3 of 2015 = Act/FEDA2015 |3 of 2017 = Act/AMA2017 |30 of 2015= Act/BSIA2015 |30 of 2017= Act/SUSSA2017 |300 = Act/SGCA2002 |301 = Act/SLAA2001 |302 = Act/SLFA1977 |302A = Act/SMUA2000 |303 = Act/SPA1954 |304 = Act/SRCSA1973 |305 = Act/SSCA1973 |305A = Act/STBA1987 |305B = Act/STBA1963 |305C = Act/STCCA1972 |305D = Act/WSAA2003 |305E = Act/SUTDA2011 |306 = Act/SDLA1979 |308 = Act/SCTA1984 |309 = Act/TCASA1993 |30A = Act/BCAA1999 |30B = Act/BCISPA2004 |30C = Act/BMSMA2004 |310 = Act/SPCPA1992 |311 = Act/SA1966 |311A = Act/SCA2007 |312 = Act/SDA1929 |313 = Act/SIA1979 |314 = Act/SLA1886 |315 = Act/SLEA1883 |316 = Act/SMCDCA1958 |317 = Act/SA1973 |317A = Act/SCARTA2013 |318 = Act/SBTSA1968 |319 = Act/SBGCPSA1983 |319A = Act/SCCCFA1989 |31A = Act/BTA2004 |32 of 2017= Act/HTCA2017 |320A = Act/SWA1995 |321 = Act/SCA1970 |322 = Act/SCJA1969 |323 = Act/TA1999 |323A = Act/TPA1990 |324 = Act/TPA1974 |324A = Act/TSBA2007 |325 = Act/TSFA2002 |327 = Act/TCA1971 |329A = Act/TCA1988 |32A = Act/CAA1988 |32B = Act/CAMC1999A2007 |33 = Act/CGSA1972 |331 = Act/TDA1941 |332 = Act/TMA1998 |333 = Act/TUA1940 |333A = Act/TCMPA2000 |334 = Act/TAA1975 |335 = Act/TDRA1960 |336 = Act/TCA2005 |337 = Act/TA1967 |338 = Act/UPA1967 |339 = Act/UNA2001 |339A = Act/UNPA2011 |33A = Act/CCA2006 |34 of 2014= Act/RGA2014 |34 of 2018= Act/IPBEA2018 |340 = Act/URAA1989 |341 = Act/VA1966 |342 = Act/VTA1903 |343 = Act/VCA1967 |344 = Act/VFA1960 |347 = Act/VSA1974 |349 = Act/WMA1975 |349A = Act/WMFA1999 |35 = Act/CA1973 |350 = Act/WOPA1904 |351 = Act/WABA1965 |352 = Act/WA1838 |353 = Act/WC1961 |354 = Act/WICA1975 |354A = Act/WSHA2006 |355 = Act/BSO1911 |356 = Act/BSGO1950 |357 = Act/CSGBA1981 |358 = Act/CBSVO1915 |359 = Act/DCCIIO1949 |36 = Act/CPFA1953 |360 = Act/DGMEAO1939 |361 = Act/FLCMIA1959 |362 = Act/FMDMO1954 |363 = Act/GSNO1958 |364 = Act/HEA1968 |365 = Act/JSO1878 |367 = Act/LSPO1957 |368 = Act/MELBO1908 |369 = Act/MEO1891 |37 = Act/CA1994 |370 = Act/NAKIO1933 |371 = Act/PMO1910 |372 = Act/PCO1876 |373 = Act/PCEMO1903 |374 = Act/RFO1948 |375 = Act/RCAA1975 |376 = Act/SAMHO1934 |377 = Act/SAO1939 |378 = Act/SMO1938 |379 = Act/SSDSO1959 |37B = Act/CWPA2000 |38 = Act/CYPA1993 |380 = Act/SRTO1918 |381 = Act/SSMIO1923 |382 = Act/SHO1904 |383 = Act/TPCSO1899 |384 = Act/BLA1992 |385 = Act/CBCA1960 |386 = Act/FA1889 |387 = Act/MIA1906 |388 = Act/MLAA1856 |389 = Act/MCA1987 |38A = Act/CDCSA2001 |39 = Act/CFA1971 |390 = Act/MA1967 |391 = Act/PA1890 |392 = Act/PAA1867 |393 = Act/SGA1979 |394 = Act/394 |395 = Act/TPRAIA1930 |396 = Act/UCTA1977 |39A = Act/CCAA2016 |4 = Act/ACA1939 |4 of 2015 = Act/MLSA2015 |40 = Act/CFHDA1966 |41 = Act/CAASA2009 |41 of 2017= Act/IPA2017 |42 = Act/CDA1986 |42A = Act/CDSA1997 |43 = Act/CLA1909 |43 of 2014= Act/PGMGFA2014 |44 = Act/CLGA1970 |45 = Act/CSCA2001 |45 of 2014= Act/PHTA2014 |45 of 2017= Act/MEA2017 |47A = Act/CISCODA2005 |48A = Act/CTA1992 |49 = Act/CGHA1961 |49A = Act/CMCA1997 |49B = Act/CCEFA2005 |4A = Act/AMDA1996 |5 of 2015 = Act/LCSCA2015 |5 of 2018 = Act/PSGA2018 |50 = Act/CoA1967 |50A = Act/CMA1993 |50B = Act/CA2004 |51 = Act/CEA2000 |52A = Act/CPFTA2003 |53 = Act/CPTDSRA1975 |53B = Act/CRTPA2001 |54 = Act/CNPIA1953 |55 = Act/CESA1973 |57 = Act/CMA1959 |57A = Act/CPA1993 |59 = Act/CVPA1998 |5A = Act/ASTRA1990 |6 = Act/ANA1966 |6 of 2014 = Act/MSMLCA2014 |6 of 2015 = Act/DSMA2015 |61 = Act/CLPA1886 |62 = Act/CSA1979 |63 = Act/CA1987 |63A = Act/CA2010 |65 = Act/CESOWA1958 |65A = Act/CDTOSCCBA1992 |65B = Act/CADDA1996 |67 = Act/CLTPA1955 |68 = Act/CPC2010 |69 = Act/CA1967 |6A = Act/ARSA2011 |6B = Act/AHPA2011 |7 = Act/ABA1965 |7 of 2015 = Act/CDRA2015 |7 of 2019 = Act/PSPMPMLTFA2019 |70 = Act/CA1960 |72 = Act/DFA1972 |73 = Act/DA1923 |74 = Act/DUA1922 |75 = Act/DA1957 |75A = Act/DSTAA2000 |76 = Act/DRA1999 |77 = Act/DTAA1950 |77B = Act/DIPOPSA2011 |78 = Act/DPA1989 |79 = Act/DIFA2000 |7A = Act/AELA1993 |8 = Act/AA1928 |80 = Act/DFA1959 |81 = Act/DLA1983 |81A = Act/DL1987A1987 |82 = Act/DCOOFA1968 |82A = Act/DCRA2005 |84 = Act/DA1934 |84A = Act/DCA2001 |85 = Act/EDBA1961 |86 = Act/EEIRITA1967 |87 = Act/EA1957 |87A = Act/EESSA1992 |87B = Act/ESIPA2001 |88 = Act/ETA2010 |89A = Act/EA2001 |9 = Act/ARA1909 |9 of 2018 = Act/CA2018 |90 = Act/EEPA1964 |91 = Act/EmA1968 |91A = Act/EFMA1990 |92 = Act/EAA1958 |92A = Act/ESIEA2006 |92B = Act/EMASA2001 |92C = Act/ECA2012 |93 = Act/EA1970 |94 = Act/EDA1950 |94A = Act/EPMA1999 |95 = Act/EPHA1987 |95A = Act/EAA2010 |96 = Act/EDA1929 |97 = Act/EA1893 |98 = Act/ECPOJA1979 |99 = Act/ECA1953 |99A = Act/ECHSA1996 |99B = Act/EDMA1999 |CONST = Act/CONS1963 |IA1 = Act/TWJA1878 |IA2 = Act/SSJTWAA1928 |IA3 = Act/MCA1911 |INDEP = Act/ISA1965 |RSI = Act/RSIA1965 |new = {{#switch:{{{year}}} |2001 = {{#switch:{{{no}}} |45 = Acts-Supp/45-2001 }} |2009 = {{#switch:{{{no}}} |15 = Acts-Supp/15-2009/Published/20120531?DocDate=20090723 }} |2010 = {{#switch:{{{no}}} |15 = Acts-Supp/15-2010/Published/20120831 }} }} |#default = }}</includeonly><noinclude>{{Documentation}}</noinclude> 33686a37543c82bd89755e0e72d87c9bd190b267 Template:Ambox globe current red 10 203 568 2020-06-05T04:54:07Z en>JJMC89 0 oops wikitext text/x-wiki {{Ambox globe |europe-africa = Ambox current red.svg |americas = Ambox current red Americas.svg |asia-australia = Ambox current red Asia Australia.svg }}<noinclude> {{Documentation}} </noinclude> 91fc691cd9ed82a9d6c951ba6b2e2575326b3270 Template:Ambox globe 10 202 566 2020-06-05T04:55:33Z en>JJMC89 0 Changed protection level for "[[Template:Ambox globe]]": [[WP:High-risk templates|Highly visible template]] (used in {{Ambox globe current red}}) ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki {{#switch:{{#expr: floor(({{#time:G}} + 2) / 8) mod 3 }} |0={{{asia-australia|Ambox globe Asia Australia.svg}}} |1={{{europe-africa|Ambox globe.svg}}} |2={{{americas|Ambox globe Americas.svg}}} }}<noinclude> {{Documentation}} </noinclude> 16453b457ebfd4a4a17bc9b6f6c37195ede3dbe9 Template:Uses TemplateStyles 10 110 278 2020-06-21T18:00:10Z en>MusikBot II 0 Protected "[[Template:Uses TemplateStyles]]": [[Wikipedia:High-risk templates|High-risk template or module]] ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require autoconfirmed or confirmed access] (indefinite)) wikitext text/x-wiki <includeonly>{{#invoke:Uses TemplateStyles|main}}</includeonly><noinclude> {{Uses TemplateStyles|Template:Uses TemplateStyles/example.css|nocat=true}} {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 7e26d8f257e302bd8a3dcbe53f52741ae0884f74 Module:Section link 828 104 266 2020-06-30T19:17:25Z en>Primefac 0 fix error for when {{}} are used inside of the slink (TPER) Scribunto text/plain -- This module implements {{section link}}. require('Module:No globals'); local checkType = require('libraryUtil').checkType local p = {} local function makeSectionLink(page, section, display) display = display or section page = page or '' -- MediaWiki doesn't allow these in `page`, so only need to do for `section` if type(section) == 'string' then section = string.gsub(section, "{", "&#x7B;") section = string.gsub(section, "}", "&#x7D;") end return string.format('[[%s#%s|%s]]', page, section, display) end local function normalizeTitle(title) title = mw.ustring.gsub(mw.ustring.gsub(title, "'", ""), '"', '') title = mw.ustring.gsub(title, "%b<>", "") return mw.title.new(title).prefixedText end function p._main(page, sections, options, title) -- Validate input. checkType('_main', 1, page, 'string', true) checkType('_main', 3, options, 'table', true) if sections == nil then sections = {} elseif type(sections) == 'string' then sections = {sections} elseif type(sections) ~= 'table' then error(string.format( "type error in argument #2 to '_main' " .. "(string, table or nil expected, got %s)", type(sections) ), 2) end options = options or {} title = title or mw.title.getCurrentTitle() -- Deal with blank page names elegantly if page and not page:find('%S') then page = nil options.nopage = true end -- Make the link(s). local isShowingPage = not options.nopage if #sections <= 1 then local linkPage = page or '' local section = sections[1] or 'Notes' local display = '§&nbsp;' .. section if isShowingPage then page = page or title.prefixedText if options.display and options.display ~= '' then if normalizeTitle(options.display) == normalizeTitle(page) then display = options.display .. ' ' .. display else error(string.format( 'Display title "%s" was ignored since it is ' .. "not equivalent to the page's actual title", options.display ), 0) end else display = page .. ' ' .. display end end return makeSectionLink(linkPage, section, display) else -- Multiple sections. First, make a list of the links to display. local ret = {} for i, section in ipairs(sections) do ret[i] = makeSectionLink(page, section) end -- Assemble the list of links into a string with mw.text.listToText. -- We use the default separator for mw.text.listToText, but a custom -- conjunction. There is also a special case conjunction if we only -- have two links. local conjunction if #sections == 2 then conjunction = '&#8203; and ' else conjunction = ', and ' end ret = mw.text.listToText(ret, nil, conjunction) -- Add the intro text. local intro = '§§&nbsp;' if isShowingPage then intro = (page or title.prefixedText) .. ' ' .. intro end ret = intro .. ret return ret end end function p.main(frame) local yesno = require('Module:Yesno') local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Section link', valueFunc = function (key, value) value = value:match('^%s*(.-)%s*$') -- Trim whitespace -- Allow blank first parameters, as the wikitext template does this. if value ~= '' or key == 1 then return value end end }) for k, v in pairs(args) do -- replace underscores in the positional parameter values if 'number' == type(k) then if not yesno (args['keep-underscores']) then -- unless |keep-underscores=yes args[k] = mw.uri.decode (v, 'WIKI'); -- percent-decode; replace underscores with space characters else args[k] = mw.uri.decode (v, 'PATH'); -- percent-decode; retain underscores end end end -- Sort the arguments. local page local sections, options = {}, {} for k, v in pairs(args) do if k == 1 then -- Doing this in the loop because of a bug in [[Module:Arguments]] -- when using pairs with deleted arguments. page = mw.text.decode(v, true) elseif type(k) == 'number' then sections[k] = v else options[k] = v end end options.nopage = yesno (options.nopage); -- make boolean -- Extract section from page, if present if page then local p, s = page:match('^(.-)#(.*)$') if p then page, sections[1] = p, s end end -- Compress the sections array. local function compressArray(t) local nums, ret = {}, {} for num in pairs(t) do nums[#nums + 1] = num end table.sort(nums) for i, num in ipairs(nums) do ret[i] = t[num] end return ret end sections = compressArray(sections) return p._main(page, sections, options) end return p 712a4e62cbae4ef21220d701037b207aec105d45 Module:String 828 61 117 2020-08-02T15:49:42Z en>RexxS 0 separate annotations for str.match from those for str._match Scribunto text/plain --[[ This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. Global options ignore_errors: If set to 'true' or 1, any error condition will result in an empty string being returned rather than an error message. error_category: If an error occurs, specifies the name of a category to include with the error message. The default category is [Category:Errors reported by Module String]. no_category: If set to 'true' or 1, no category will be added if an error is generated. Unit tests for this module are available at Module:String/tests. ]] local str = {} --[[ len This function returns the length of the target string. Usage: {{#invoke:String|len|target_string|}} OR {{#invoke:String|len|s=target_string}} Parameters s: The string whose length to report If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. ]] function str.len( frame ) local new_args = str._getParameters( frame.args, {'s'} ) local s = new_args['s'] or '' return mw.ustring.len( s ) end --[[ sub This function returns a substring of the target string at specified indices. Usage: {{#invoke:String|sub|target_string|start_index|end_index}} OR {{#invoke:String|sub|s=target_string|i=start_index|j=end_index}} Parameters s: The string to return a subset of i: The fist index of the substring to return, defaults to 1. j: The last index of the string to return, defaults to the last character. The first character of the string is assigned an index of 1. If either i or j is a negative value, it is interpreted the same as selecting a character by counting from the end of the string. Hence, a value of -1 is the same as selecting the last character of the string. If the requested indices are out of range for the given string, an error is reported. ]] function str.sub( frame ) local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } ) local s = new_args['s'] or '' local i = tonumber( new_args['i'] ) or 1 local j = tonumber( new_args['j'] ) or -1 local len = mw.ustring.len( s ) -- Convert negatives for range checking if i < 0 then i = len + i + 1 end if j < 0 then j = len + j + 1 end if i > len or j > len or i < 1 or j < 1 then return str._error( 'String subset index out of range' ) end if j < i then return str._error( 'String subset indices out of order' ) end return mw.ustring.sub( s, i, j ) end --[[ This function implements that features of {{str sub old}} and is kept in order to maintain these older templates. ]] function str.sublength( frame ) local i = tonumber( frame.args.i ) or 0 local len = tonumber( frame.args.len ) return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) ) end --[[ _match This function returns a substring from the source string that matches a specified pattern. It is exported for use in other modules Usage: strmatch = require("Module:String")._match sresult = strmatch( s, pattern, start, match, plain, nomatch ) Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This sub-routine is exported for use in other modules function str._match( s, pattern, start, match_index, plain_flag, nomatch ) if s == '' then return str._error( 'Target string is empty' ) end if pattern == '' then return str._error( 'Pattern string is empty' ) end start = tonumber(start) or 1 if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then return str._error( 'Requested start is out of range' ) end if match_index == 0 then return str._error( 'Match index is out of range' ) end if plain_flag then pattern = str._escapePattern( pattern ) end local result if match_index == 1 then -- Find first match is simple case result = mw.ustring.match( s, pattern, start ) else if start > 1 then s = mw.ustring.sub( s, start ) end local iterator = mw.ustring.gmatch(s, pattern) if match_index > 0 then -- Forward search for w in iterator do match_index = match_index - 1 if match_index == 0 then result = w break end end else -- Reverse search local result_table = {} local count = 1 for w in iterator do result_table[count] = w count = count + 1 end result = result_table[ count + match_index ] end end if result == nil then if nomatch == nil then return str._error( 'Match not found' ) else return nomatch end else return result end end --[[ match This function returns a substring from the source string that matches a specified pattern. Usage: {{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}} OR {{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index |match=match_number|plain=plain_flag|nomatch=nomatch_output}} Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from each string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. If the match_number or start_index are out of range for the string being queried, then this function generates an error. An error is also generated if no match is found. If one adds the parameter ignore_errors=true, then the error will be suppressed and an empty string will be returned on any failure. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This is the entry point for #invoke:String|match function str.match( frame ) local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} ) local s = new_args['s'] or '' local start = tonumber( new_args['start'] ) or 1 local plain_flag = str._getBoolean( new_args['plain'] or false ) local pattern = new_args['pattern'] or '' local match_index = math.floor( tonumber(new_args['match']) or 1 ) local nomatch = new_args['nomatch'] return str._match( s, pattern, start, match_index, plain_flag, nomatch ) end --[[ pos This function returns a single character from the target string at position pos. Usage: {{#invoke:String|pos|target_string|index_value}} OR {{#invoke:String|pos|target=target_string|pos=index_value}} Parameters target: The string to search pos: The index for the character to return If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. The first character has an index value of 1. If one requests a negative value, this function will select a character by counting backwards from the end of the string. In other words pos = -1 is the same as asking for the last character. A requested value of zero, or a value greater than the length of the string returns an error. ]] function str.pos( frame ) local new_args = str._getParameters( frame.args, {'target', 'pos'} ) local target_str = new_args['target'] or '' local pos = tonumber( new_args['pos'] ) or 0 if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then return str._error( 'String index out of range' ) end return mw.ustring.sub( target_str, pos, pos ) end --[[ str_find This function duplicates the behavior of {{str_find}}, including all of its quirks. This is provided in order to support existing templates, but is NOT RECOMMENDED for new code and templates. New code is recommended to use the "find" function instead. Returns the first index in "source" that is a match to "target". Indexing is 1-based, and the function returns -1 if the "target" string is not present in "source". Important Note: If the "target" string is empty / missing, this function returns a value of "1", which is generally unexpected behavior, and must be accounted for separatetly. ]] function str.str_find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target'} ) local source_str = new_args['source'] or '' local target_str = new_args['target'] or '' if target_str == '' then return 1 end local start = mw.ustring.find( source_str, target_str, 1, true ) if start == nil then start = -1 end return start end --[[ find This function allows one to search for a target string or pattern within another string. Usage: {{#invoke:String|find|source_str|target_string|start_index|plain_flag}} OR {{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}} Parameters source: The string to search target: The string or pattern to find within source start: The index within the source string to start the search, defaults to 1 plain: Boolean flag indicating that target should be understood as plain text and not as a Lua style regular expression, defaults to true If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. This function returns the first index >= "start" where "target" can be found within "source". Indices are 1-based. If "target" is not found, then this function returns 0. If either "source" or "target" are missing / empty, this function also returns 0. This function should be safe for UTF-8 strings. ]] function str.find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['target'] or '' local start_pos = tonumber(new_args['start']) or 1 local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return 0 end plain = str._getBoolean( plain ) local start = mw.ustring.find( source_str, pattern, start_pos, plain ) if start == nil then start = 0 end return start end --[[ replace This function allows one to replace a target string or pattern within another string. Usage: {{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}} OR {{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string| count=replacement_count|plain=plain_flag}} Parameters source: The string to search pattern: The string or pattern to find within source replace: The replacement text count: The number of occurences to replace, defaults to all. plain: Boolean flag indicating that pattern should be understood as plain text and not as a Lua style regular expression, defaults to true ]] function str.replace( frame ) local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['pattern'] or '' local replace = new_args['replace'] or '' local count = tonumber( new_args['count'] ) local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return source_str end plain = str._getBoolean( plain ) if plain then pattern = str._escapePattern( pattern ) replace = mw.ustring.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences. end local result if count ~= nil then result = mw.ustring.gsub( source_str, pattern, replace, count ) else result = mw.ustring.gsub( source_str, pattern, replace ) end return result end --[[ simple function to pipe string.rep to templates. ]] function str.rep( frame ) local repetitions = tonumber( frame.args[2] ) if not repetitions then return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' ) end return string.rep( frame.args[1] or '', repetitions ) end --[[ escapePattern This function escapes special characters from a Lua string pattern. See [1] for details on how patterns work. [1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns Usage: {{#invoke:String|escapePattern|pattern_string}} Parameters pattern_string: The pattern string to escape. ]] function str.escapePattern( frame ) local pattern_str = frame.args[1] if not pattern_str then return str._error( 'No pattern string specified' ) end local result = str._escapePattern( pattern_str ) return result end --[[ count This function counts the number of occurrences of one string in another. ]] function str.count(frame) local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'}) local source = args.source or '' local pattern = args.pattern or '' local plain = str._getBoolean(args.plain or true) if plain then pattern = str._escapePattern(pattern) end local _, count = mw.ustring.gsub(source, pattern, '') return count end --[[ endswith This function determines whether a string ends with another string. ]] function str.endswith(frame) local args = str._getParameters(frame.args, {'source', 'pattern'}) local source = args.source or '' local pattern = args.pattern or '' if pattern == '' then -- All strings end with the empty string. return "yes" end if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then return "yes" else return "" end end --[[ join Join all non empty arguments together; the first argument is the separator. Usage: {{#invoke:String|join|sep|one|two|three}} ]] function str.join(frame) local args = {} local sep for _, v in ipairs( frame.args ) do if sep then if v ~= '' then table.insert(args, v) end else sep = v end end return table.concat( args, sep or '' ) end --[[ Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters. This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application. ]] function str._getParameters( frame_args, arg_list ) local new_args = {} local index = 1 local value for _, arg in ipairs( arg_list ) do value = frame_args[arg] if value == nil then value = frame_args[index] index = index + 1 end new_args[arg] = value end return new_args end --[[ Helper function to handle error messages. ]] function str._error( error_str ) local frame = mw.getCurrentFrame() local error_category = frame.args.error_category or 'Errors reported by Module String' local ignore_errors = frame.args.ignore_errors or false local no_category = frame.args.no_category or false if str._getBoolean(ignore_errors) then return '' end local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>' if error_category ~= '' and not str._getBoolean( no_category ) then error_str = '[[Category:' .. error_category .. ']]' .. error_str end return error_str end --[[ Helper Function to interpret boolean strings ]] function str._getBoolean( boolean_str ) local boolean_value if type( boolean_str ) == 'string' then boolean_str = boolean_str:lower() if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0' or boolean_str == '' then boolean_value = false else boolean_value = true end elseif type( boolean_str ) == 'boolean' then boolean_value = boolean_str else error( 'No boolean value found' ) end return boolean_value end --[[ Helper function that escapes all pattern characters so that they will be treated as plain text. ]] function str._escapePattern( pattern_str ) return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" ) end return str 6df794dd52434e0f6a372c9918f5a9dedd15f579 205 117 2020-09-18T09:10:24Z en>Anaaxes 0 1 revision imported Scribunto text/plain --[[ This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. Global options ignore_errors: If set to 'true' or 1, any error condition will result in an empty string being returned rather than an error message. error_category: If an error occurs, specifies the name of a category to include with the error message. The default category is [Category:Errors reported by Module String]. no_category: If set to 'true' or 1, no category will be added if an error is generated. Unit tests for this module are available at Module:String/tests. ]] local str = {} --[[ len This function returns the length of the target string. Usage: {{#invoke:String|len|target_string|}} OR {{#invoke:String|len|s=target_string}} Parameters s: The string whose length to report If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. ]] function str.len( frame ) local new_args = str._getParameters( frame.args, {'s'} ) local s = new_args['s'] or '' return mw.ustring.len( s ) end --[[ sub This function returns a substring of the target string at specified indices. Usage: {{#invoke:String|sub|target_string|start_index|end_index}} OR {{#invoke:String|sub|s=target_string|i=start_index|j=end_index}} Parameters s: The string to return a subset of i: The fist index of the substring to return, defaults to 1. j: The last index of the string to return, defaults to the last character. The first character of the string is assigned an index of 1. If either i or j is a negative value, it is interpreted the same as selecting a character by counting from the end of the string. Hence, a value of -1 is the same as selecting the last character of the string. If the requested indices are out of range for the given string, an error is reported. ]] function str.sub( frame ) local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } ) local s = new_args['s'] or '' local i = tonumber( new_args['i'] ) or 1 local j = tonumber( new_args['j'] ) or -1 local len = mw.ustring.len( s ) -- Convert negatives for range checking if i < 0 then i = len + i + 1 end if j < 0 then j = len + j + 1 end if i > len or j > len or i < 1 or j < 1 then return str._error( 'String subset index out of range' ) end if j < i then return str._error( 'String subset indices out of order' ) end return mw.ustring.sub( s, i, j ) end --[[ This function implements that features of {{str sub old}} and is kept in order to maintain these older templates. ]] function str.sublength( frame ) local i = tonumber( frame.args.i ) or 0 local len = tonumber( frame.args.len ) return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) ) end --[[ _match This function returns a substring from the source string that matches a specified pattern. It is exported for use in other modules Usage: strmatch = require("Module:String")._match sresult = strmatch( s, pattern, start, match, plain, nomatch ) Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This sub-routine is exported for use in other modules function str._match( s, pattern, start, match_index, plain_flag, nomatch ) if s == '' then return str._error( 'Target string is empty' ) end if pattern == '' then return str._error( 'Pattern string is empty' ) end start = tonumber(start) or 1 if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then return str._error( 'Requested start is out of range' ) end if match_index == 0 then return str._error( 'Match index is out of range' ) end if plain_flag then pattern = str._escapePattern( pattern ) end local result if match_index == 1 then -- Find first match is simple case result = mw.ustring.match( s, pattern, start ) else if start > 1 then s = mw.ustring.sub( s, start ) end local iterator = mw.ustring.gmatch(s, pattern) if match_index > 0 then -- Forward search for w in iterator do match_index = match_index - 1 if match_index == 0 then result = w break end end else -- Reverse search local result_table = {} local count = 1 for w in iterator do result_table[count] = w count = count + 1 end result = result_table[ count + match_index ] end end if result == nil then if nomatch == nil then return str._error( 'Match not found' ) else return nomatch end else return result end end --[[ match This function returns a substring from the source string that matches a specified pattern. Usage: {{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}} OR {{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index |match=match_number|plain=plain_flag|nomatch=nomatch_output}} Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from each string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. If the match_number or start_index are out of range for the string being queried, then this function generates an error. An error is also generated if no match is found. If one adds the parameter ignore_errors=true, then the error will be suppressed and an empty string will be returned on any failure. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This is the entry point for #invoke:String|match function str.match( frame ) local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} ) local s = new_args['s'] or '' local start = tonumber( new_args['start'] ) or 1 local plain_flag = str._getBoolean( new_args['plain'] or false ) local pattern = new_args['pattern'] or '' local match_index = math.floor( tonumber(new_args['match']) or 1 ) local nomatch = new_args['nomatch'] return str._match( s, pattern, start, match_index, plain_flag, nomatch ) end --[[ pos This function returns a single character from the target string at position pos. Usage: {{#invoke:String|pos|target_string|index_value}} OR {{#invoke:String|pos|target=target_string|pos=index_value}} Parameters target: The string to search pos: The index for the character to return If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. The first character has an index value of 1. If one requests a negative value, this function will select a character by counting backwards from the end of the string. In other words pos = -1 is the same as asking for the last character. A requested value of zero, or a value greater than the length of the string returns an error. ]] function str.pos( frame ) local new_args = str._getParameters( frame.args, {'target', 'pos'} ) local target_str = new_args['target'] or '' local pos = tonumber( new_args['pos'] ) or 0 if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then return str._error( 'String index out of range' ) end return mw.ustring.sub( target_str, pos, pos ) end --[[ str_find This function duplicates the behavior of {{str_find}}, including all of its quirks. This is provided in order to support existing templates, but is NOT RECOMMENDED for new code and templates. New code is recommended to use the "find" function instead. Returns the first index in "source" that is a match to "target". Indexing is 1-based, and the function returns -1 if the "target" string is not present in "source". Important Note: If the "target" string is empty / missing, this function returns a value of "1", which is generally unexpected behavior, and must be accounted for separatetly. ]] function str.str_find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target'} ) local source_str = new_args['source'] or '' local target_str = new_args['target'] or '' if target_str == '' then return 1 end local start = mw.ustring.find( source_str, target_str, 1, true ) if start == nil then start = -1 end return start end --[[ find This function allows one to search for a target string or pattern within another string. Usage: {{#invoke:String|find|source_str|target_string|start_index|plain_flag}} OR {{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}} Parameters source: The string to search target: The string or pattern to find within source start: The index within the source string to start the search, defaults to 1 plain: Boolean flag indicating that target should be understood as plain text and not as a Lua style regular expression, defaults to true If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. This function returns the first index >= "start" where "target" can be found within "source". Indices are 1-based. If "target" is not found, then this function returns 0. If either "source" or "target" are missing / empty, this function also returns 0. This function should be safe for UTF-8 strings. ]] function str.find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['target'] or '' local start_pos = tonumber(new_args['start']) or 1 local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return 0 end plain = str._getBoolean( plain ) local start = mw.ustring.find( source_str, pattern, start_pos, plain ) if start == nil then start = 0 end return start end --[[ replace This function allows one to replace a target string or pattern within another string. Usage: {{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}} OR {{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string| count=replacement_count|plain=plain_flag}} Parameters source: The string to search pattern: The string or pattern to find within source replace: The replacement text count: The number of occurences to replace, defaults to all. plain: Boolean flag indicating that pattern should be understood as plain text and not as a Lua style regular expression, defaults to true ]] function str.replace( frame ) local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['pattern'] or '' local replace = new_args['replace'] or '' local count = tonumber( new_args['count'] ) local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return source_str end plain = str._getBoolean( plain ) if plain then pattern = str._escapePattern( pattern ) replace = mw.ustring.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences. end local result if count ~= nil then result = mw.ustring.gsub( source_str, pattern, replace, count ) else result = mw.ustring.gsub( source_str, pattern, replace ) end return result end --[[ simple function to pipe string.rep to templates. ]] function str.rep( frame ) local repetitions = tonumber( frame.args[2] ) if not repetitions then return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' ) end return string.rep( frame.args[1] or '', repetitions ) end --[[ escapePattern This function escapes special characters from a Lua string pattern. See [1] for details on how patterns work. [1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns Usage: {{#invoke:String|escapePattern|pattern_string}} Parameters pattern_string: The pattern string to escape. ]] function str.escapePattern( frame ) local pattern_str = frame.args[1] if not pattern_str then return str._error( 'No pattern string specified' ) end local result = str._escapePattern( pattern_str ) return result end --[[ count This function counts the number of occurrences of one string in another. ]] function str.count(frame) local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'}) local source = args.source or '' local pattern = args.pattern or '' local plain = str._getBoolean(args.plain or true) if plain then pattern = str._escapePattern(pattern) end local _, count = mw.ustring.gsub(source, pattern, '') return count end --[[ endswith This function determines whether a string ends with another string. ]] function str.endswith(frame) local args = str._getParameters(frame.args, {'source', 'pattern'}) local source = args.source or '' local pattern = args.pattern or '' if pattern == '' then -- All strings end with the empty string. return "yes" end if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then return "yes" else return "" end end --[[ join Join all non empty arguments together; the first argument is the separator. Usage: {{#invoke:String|join|sep|one|two|three}} ]] function str.join(frame) local args = {} local sep for _, v in ipairs( frame.args ) do if sep then if v ~= '' then table.insert(args, v) end else sep = v end end return table.concat( args, sep or '' ) end --[[ Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters. This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application. ]] function str._getParameters( frame_args, arg_list ) local new_args = {} local index = 1 local value for _, arg in ipairs( arg_list ) do value = frame_args[arg] if value == nil then value = frame_args[index] index = index + 1 end new_args[arg] = value end return new_args end --[[ Helper function to handle error messages. ]] function str._error( error_str ) local frame = mw.getCurrentFrame() local error_category = frame.args.error_category or 'Errors reported by Module String' local ignore_errors = frame.args.ignore_errors or false local no_category = frame.args.no_category or false if str._getBoolean(ignore_errors) then return '' end local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>' if error_category ~= '' and not str._getBoolean( no_category ) then error_str = '[[Category:' .. error_category .. ']]' .. error_str end return error_str end --[[ Helper Function to interpret boolean strings ]] function str._getBoolean( boolean_str ) local boolean_value if type( boolean_str ) == 'string' then boolean_str = boolean_str:lower() if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0' or boolean_str == '' then boolean_value = false else boolean_value = true end elseif type( boolean_str ) == 'boolean' then boolean_value = boolean_str else error( 'No boolean value found' ) end return boolean_value end --[[ Helper function that escapes all pattern characters so that they will be treated as plain text. ]] function str._escapePattern( pattern_str ) return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" ) end return str 6df794dd52434e0f6a372c9918f5a9dedd15f579 Template:Yesno 10 38 71 2020-08-28T03:15:17Z en>Xaosflux 0 add additional paramerters, "t", "f" - requested on talk - worked in sandbox /testcases wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }} |no |n |f |false |off |0 = {{{no|<!-- null -->}}} | = {{{blank|{{{no|<!-- null -->}}}}}} |¬ = {{{¬|}}} |yes |y |t |true |on |1 = {{{yes|yes}}} |#default = {{{def|{{{yes|yes}}}}}} }}<noinclude> {{Documentation}} </noinclude> 629c2937bc5cf7cfe13cd2a598582af832782399 Module:TNT 828 113 284 2020-08-30T07:28:25Z en>Johnuniq 0 Changed protection level for "[[Module:TNT]]": [[WP:High-risk templates|High-risk Lua module]]: per request at [[WP:RFPP]] to match [[Module:Excerpt]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) Scribunto text/plain -- -- INTRO: (!!! DO NOT RENAME THIS PAGE !!!) -- This module allows any template or module to be copy/pasted between -- wikis without any translation changes. All translation text is stored -- in the global Data:*.tab pages on Commons, and used everywhere. -- -- SEE: https://www.mediawiki.org/wiki/Multilingual_Templates_and_Modules -- -- ATTENTION: -- Please do NOT rename this module - it has to be identical on all wikis. -- This code is maintained at https://www.mediawiki.org/wiki/Module:TNT -- Please do not modify it anywhere else, as it may get copied and override your changes. -- Suggestions can be made at https://www.mediawiki.org/wiki/Module_talk:TNT -- -- DESCRIPTION: -- The "msg" function uses a Commons dataset to translate a message -- with a given key (e.g. source-table), plus optional arguments -- to the wiki markup in the current content language. -- Use lang=xx to set language. Example: -- -- {{#invoke:TNT | msg -- | I18n/Template:Graphs.tab <!-- https://commons.wikimedia.org/wiki/Data:I18n/Template:Graphs.tab --> -- | source-table <!-- uses a translation message with id = "source-table" --> -- | param1 }} <!-- optional parameter --> -- -- -- The "doc" function will generate the <templatedata> parameter documentation for templates. -- This way all template parameters can be stored and localized in a single Commons dataset. -- NOTE: "doc" assumes that all documentation is located in Data:Templatedata/* on Commons. -- -- {{#invoke:TNT | doc | Graph:Lines }} -- uses https://commons.wikimedia.org/wiki/Data:Templatedata/Graph:Lines.tab -- if the current page is Template:Graph:Lines/doc -- local p = {} local i18nDataset = 'I18n/Module:TNT.tab' -- Forward declaration of the local functions local sanitizeDataset, loadData, link, formatMessage function p.msg(frame) local dataset, id local params = {} local lang = nil for k, v in pairs(frame.args) do if k == 1 then dataset = mw.text.trim(v) elseif k == 2 then id = mw.text.trim(v) elseif type(k) == 'number' then table.insert(params, mw.text.trim(v)) elseif k == 'lang' and v ~= '_' then lang = mw.text.trim(v) end end return formatMessage(dataset, id, params, lang) end -- Identical to p.msg() above, but used from other lua modules -- Parameters: name of dataset, message key, optional arguments -- Example with 2 params: format('I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset') function p.format(dataset, key, ...) local checkType = require('libraryUtil').checkType checkType('format', 1, dataset, 'string') checkType('format', 2, key, 'string') return formatMessage(dataset, key, {...}) end -- Identical to p.msg() above, but used from other lua modules with the language param -- Parameters: language code, name of dataset, message key, optional arguments -- Example with 2 params: formatInLanguage('es', I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset') function p.formatInLanguage(lang, dataset, key, ...) local checkType = require('libraryUtil').checkType checkType('formatInLanguage', 1, lang, 'string') checkType('formatInLanguage', 2, dataset, 'string') checkType('formatInLanguage', 3, key, 'string') return formatMessage(dataset, key, {...}, lang) end -- Obsolete function that adds a 'c:' prefix to the first param. -- "Sandbox/Sample.tab" -> 'c:Data:Sandbox/Sample.tab' function p.link(frame) return link(frame.args[1]) end function p.doc(frame) local dataset = 'Templatedata/' .. sanitizeDataset(frame.args[1]) return frame:extensionTag('templatedata', p.getTemplateData(dataset)) .. formatMessage(i18nDataset, 'edit_doc', {link(dataset)}) end function p.getTemplateData(dataset) -- TODO: add '_' parameter once lua starts reindexing properly for "all" languages local data = loadData(dataset) local names = {} for _, field in pairs(data.schema.fields) do table.insert(names, field.name) end local params = {} local paramOrder = {} for _, row in pairs(data.data) do local newVal = {} local name = nil for pos, val in pairs(row) do local columnName = names[pos] if columnName == 'name' then name = val else newVal[columnName] = val end end if name then params[name] = newVal table.insert(paramOrder, name) end end -- Work around json encoding treating {"1":{...}} as an [{...}] params['zzz123']='' local json = mw.text.jsonEncode({ params=params, paramOrder=paramOrder, description=data.description }) json = string.gsub(json,'"zzz123":"",?', "") return json end -- Local functions sanitizeDataset = function(dataset) if not dataset then return nil end dataset = mw.text.trim(dataset) if dataset == '' then return nil elseif string.sub(dataset,-4) ~= '.tab' then return dataset .. '.tab' else return dataset end end loadData = function(dataset, lang) dataset = sanitizeDataset(dataset) if not dataset then error(formatMessage(i18nDataset, 'error_no_dataset', {})) end -- Give helpful error to thirdparties who try and copy this module. if not mw.ext or not mw.ext.data or not mw.ext.data.get then error('Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:' .. dataset) end local data = mw.ext.data.get(dataset, lang) if data == false then if dataset == i18nDataset then -- Prevent cyclical calls error('Missing Commons dataset ' .. i18nDataset) else error(formatMessage(i18nDataset, 'error_bad_dataset', {link(dataset)})) end end return data end -- Given a dataset name, convert it to a title with the 'commons:data:' prefix link = function(dataset) return 'c:Data:' .. mw.text.trim(dataset or '') end formatMessage = function(dataset, key, params, lang) for _, row in pairs(loadData(dataset, lang).data) do local id, msg = unpack(row) if id == key then local result = mw.message.newRawMessage(msg, unpack(params or {})) return result:plain() end end if dataset == i18nDataset then -- Prevent cyclical calls error('Invalid message key "' .. key .. '"') else error(formatMessage(i18nDataset, 'error_bad_msgkey', {key, link(dataset)})) end end return p 9d0d10e54abd232c806dcabccaf03e52858634a1 Module:Message box/configuration 828 56 153 2020-09-01T22:39:19Z en>Dmehus 0 Protected "[[Module:Message box/configuration]]": High-risk template: To match protection settings of parent page. ([Edit=Allow only logged in users] (indefinite) [Move=Allow only administrators] (indefinite)) Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '[[Help:Maintenance template removal|Learn how and when to remove this template message]]' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox license.png' -- @todo We need an SVG version of this }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg' }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes' }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, imageEmptyCellStyle = true, templateCategory = 'Talk message boxes' } } ef8171b8278c52d9c20a4149614d97cd948670c2 Template:Subpage other 10 162 386 2020-09-10T16:00:23Z wikipedia>Favonian 0 Changed protection level for "[[Template:Subpage other]]": [[WP:High-risk templates|Highly visible template]]: requested at [[WP:RFPP]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki {{#ifeq:{{SUBPAGENAME}}|{{ROOTPAGENAME}}|{{{2|}}}|{{{1|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> ebcb508ec39c25594f4151c4e32c01eeb5732f3d Template:Template other 10 34 199 63 2020-09-18T09:10:19Z en>Anaaxes 0 1 revision imported wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Template}} | template | other }} }} | template = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 06fb13d264df967b5232141067eb7d2b67372d76 Template:If empty 10 15 189 2020-09-20T02:16:28Z en>Anaaxes 0 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:If empty|main}}<noinclude>{{Documentation}}</noinclude> 745940b7bdde8a1585c887ee4ee5ce81d98461a4 Module:Effective protection level 828 47 89 2020-09-29T03:38:47Z en>Jackmcbarn 0 bring in changes from sandbox Scribunto text/plain local p = {} -- Returns the permission required to perform a given action on a given title. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local level = mw.ext.FlaggedRevs.getStabilitySettings(title) level = level and level.autoreview if level == 'review' then return 'reviewer' elseif level ~= '' then return level else return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review end elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then error( 'First parameter must be one of edit, move, create, upload, undelete, autoreview', 2 ) end if title.namespace == 8 then -- MediaWiki namespace if title.text:sub(-3) == '.js' or title.text:sub(-4) == '.css' or title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page return 'interfaceadmin' else -- any non-JS/CSS MediaWiki page return 'sysop' end elseif title.namespace == 2 and title.isSubpage then if title.contentModel == 'javascript' or title.contentModel == 'css' then -- user JS or CSS page return 'interfaceadmin' elseif title.contentModel == 'json' then -- user JSON page return 'sysop' end end if action == 'undelete' then return 'sysop' end local level = title.protectionLevels[action] and title.protectionLevels[action][1] if level == 'sysop' or level == 'editprotected' then return 'sysop' elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page return 'sysop' elseif level == 'templateeditor' then return 'templateeditor' elseif action == 'move' then local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move. if blacklistentry and not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif title.namespace == 6 then return 'filemover' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end end local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename) if blacklistentry then if not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason return 'autoconfirmed' elseif level then return level elseif action == 'upload' then return 'autoconfirmed' elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts return 'user' else return '*' end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p 70256a489edf6be9808031b14a7e3ef3e025da97 Module:Documentation 828 43 147 2020-10-27T20:30:26Z en>Pppery 0 Revert recent imported edits whose sole effect was to add support for templates that don't exist on Miraheze meta Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs local messageBox = require('Module:Message box') -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end local ret = ugsub(msg, '$([1-9][0-9]*)', getMessageVal) return ret end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end return '<small style="font-style: normal;">(' .. table.concat(ret, ' &#124; ') .. ')</small>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Main function ---------------------------------------------------------------------------- p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user -- -- Messages: -- 'main-div-id' --> 'template-documentation' -- 'main-div-classes' --> 'template-documentation iezoomfix' --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) -- This div tag is from {{documentation/start box}}, but moving it here -- so that we don't have to worry about unclosed tags. :tag('div') :attr('id', message('main-div-id')) :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') :css('clear', 'both') -- So right or left floating items don't stick out of the doc box. :newline() :done() :done() :wikitext(p._endBox(args, env)) :wikitext(p.addTrackingCategories(env)) return tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title objects and other namespace- or -- path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- env.printTitle - the print version of the template, located at the /Print subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.printTitle() --[[ -- Title object for the /Print subpage. -- Messages: -- 'print-subpage' --> 'Print' --]] return env.templateTitle:subPageTitle(message('print-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the same as the -- subject namespace. However, pages in the Article, File, MediaWiki or Category -- namespaces must have their /doc, /sandbox and /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.fullUrl( 'Special:ComparePages', {page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[Image:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') else pagetype = message('sandbox-notice-pagetype-other') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. text = text .. makeCategoryLink(message('sandbox-category')) omargs.text = text local ret = '<div style="clear: both;"></div>' ret = ret .. messageBox.main('ombox', omargs) return ret end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels, mProtectionBanner local title = env.title protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. mProtectionBanner = require('Module:Protection banner') local reason = message('protection-reason-edit') return mProtectionBanner._main{reason, small = true} elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. mProtectionBanner = require('Module:Protection banner') return mProtectionBanner._main{action = 'move', small = true} else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'file-docpage-preload' --> 'Template:Documentation/preload-filespace' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end local data = {} data.title = title data.docTitle = docTitle -- View, display, edit, and purge links if /doc exists. data.viewLinkDisplay = message('view-link-display') data.editLinkDisplay = message('edit-link-display') data.historyLinkDisplay = message('history-link-display') data.purgeLinkDisplay = message('purge-link-display') -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 6 then -- File namespace preload = message('file-docpage-preload') elseif subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end data.preload = preload data.createLinkDisplay = message('create-link-display') return data end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local function escapeBrackets(s) -- Escapes square brackets with HTML entities. s = s:gsub('%[', '&#91;') -- Replace square brackets with HTML entities. s = s:gsub('%]', '&#93;') return s end local ret local docTitle = data.docTitle local title = data.title if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay) local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay) local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay) ret = '[%s] [%s] [%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink) else local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) ret = '[%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, createLink) end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'start-box-linkclasses' --> 'mw-editsection-like plainlinks' -- 'start-box-link-id' --> 'doc_editlinks' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle elseif subjectSpace == 10 then -- We are in the template or template talk namespaces. data.headingFontWeight = 'bold' data.headingFontSize = '125%' else data.headingFontSize = '150%' end -- Data for the [view][edit][history][purge] or [create] links. if links then data.linksClass = message('start-box-linkclasses') data.linksId = message('start-box-link-id') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox :css('padding-bottom', '3px') :css('border-bottom', '1px solid #aaa') :css('margin-bottom', '1ex') :newline() :tag('span') :cssText(data.headingStyleText) :css('font-weight', data.headingFontWeight) :css('font-size', data.headingFontSize) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'fmbox-id' --> 'documentation-meta-data' -- 'fmbox-style' --> 'background-color: #ecfcf4' -- 'fmbox-textstyle' --> 'font-style: italic' -- -- The HTML is generated by the {{fmbox}} template, courtesy of [[Module:Message box]]. --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the arguments for {{fmbox}}. local fmargs = {} fmargs.id = message('fmbox-id') -- Sets 'documentation-meta-data' fmargs.image = 'none' fmargs.style = message('fmbox-style') -- Sets 'background-color: #ecfcf4' fmargs.textstyle = message('fmbox-textstyle') -- 'font-style: italic;' -- Assemble the fmbox text field. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') text = text .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" local printBlurb = p.makePrintBlurb(args, env) -- Two-line blurb about print versions of templates. if printBlurb then text = text .. '<br />' .. printBlurb end end end fmargs.text = text return messageBox.main('fmbox', fmargs) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Wikipedia:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editUrl = docTitle:fullUrl{action = 'edit'} local editDisplay = message('edit-link-display') local editLink = makeUrlLink(editUrl, editDisplay) local historyUrl = docTitle:fullUrl{action = 'history'} local historyDisplay = message('history-link-display') local historyLink = makeUrlLink(historyUrl, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'} local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end function p.makePrintBlurb(args, env) --[=[ -- Generates the blurb displayed when there is a print version of the template available. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'print-link-display' --> '/Print' -- 'print-blurb' --> 'A [[Help:Books/for experts#Improving the book layout|print version]]' -- .. ' of this template exists at $1.' -- .. ' If you make a change to this template, please update the print version as well.' -- 'display-print-category' --> true -- 'print-category' --> 'Templates with print versions' --]=] local printTitle = env.printTitle if not printTitle then return nil end local ret if printTitle.exists then local printLink = makeWikilink(printTitle.prefixedText, message('print-link-display')) ret = message('print-blurb', {printLink}) local displayPrintCategory = message('display-print-category', nil, 'boolean') if displayPrintCategory then ret = ret .. makeCategoryLink(message('print-category')) end end return ret end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p 02dd358f7f100661fa71458d29fd0513baadcfcc Module:Documentation/styles.css 828 45 85 2020-11-19T20:21:58Z en>Izno 0 Changed protection level for "[[Module:Documentation/styles.css]]": actually match module ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) text text/plain /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } ce0e629c92e3d825ab9fd927fe6cc37d9117b6cb Template:Tld 10 93 240 2020-11-20T18:52:18Z en>Primefac 0 avoid redir wikitext text/x-wiki #REDIRECT [[Template:Template link code]] be5d6275ea41d83224503e05901f3405c82141f7 Template:Tlx 10 94 242 2020-11-20T18:53:35Z en>Primefac 0 Primefac moved page [[Template:Tlx]] to [[Template:Template link expanded]] over redirect: expand name, make it more obvious wikitext text/x-wiki #REDIRECT [[Template:Template link expanded]] {{Redirect category shell| {{R from move}} }} 1fec988ceb46cb324af228aac45d7cd25fcc9008 Template:Template link expanded 10 92 238 2020-11-21T12:04:41Z en>Primefac 0 update wikitext text/x-wiki {{#Invoke:Template link general|main|code=on}}<noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlx}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 6c99696fee02f1da368ed20d2504e19bc15b1c13 Template:Template link code 10 91 236 2020-11-21T12:06:22Z en>Primefac 0 update wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nolink=yes|code=yes|nowrap=yes}}</includeonly><noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlc}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 044f00ca1bfc10cb967c32e893043ccc6f739764 Template:Country data Senegal 10 150 362 2020-11-22T16:02:23Z wikipedia>Skjoldbro 0 wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Senegal | flag alias = Flag of Senegal.svg | link alias-air force = Senegalese Air Force | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} <noinclude> | redir1 = SEN </noinclude> }} 4e28b333600411f6b24786882c954a6b3b441721 Template:Tlc 10 199 552 2021-01-23T16:04:55Z en>Elli 0 cats wikitext text/x-wiki #REDIRECT [[Template:Template link code]] {{Redirect category shell| {{R from template shortcut}} {{R from high-use template}} {{R from move}} }} 48ef4a029c0e27cccb1148a29fb8b7ccb211a4a2 Template:Tl 10 36 67 2021-02-12T22:03:00Z en>Anthony Appleyard 0 Anthony Appleyard moved page [[Template:Tl]] to [[Template:Template link]]: [[Special:Permalink/1006428669|Requested]] by Buidhe at [[WP:RM/TR]]: RM closed as move wikitext text/x-wiki #REDIRECT [[Template:Template link]] {{Redirect category shell| {{R from move}} }} d6593bb3b4a866249f55d0f34b047a71fe1f1529 Module:Collapsible list 828 42 79 2021-02-23T20:18:07Z en>Izno 0 and this one also per jonesey Scribunto text/plain -- This module implements {{collapsible list}}. local p = {} local function gettitlestyletracking( ts ) if not ts then return '' end ts = mw.ustring.gsub(mw.ustring.lower(ts), '%s', '') local tsvals = mw.text.split(ts, ';') table.sort(tsvals) local skey = table.concat(tsvals,';') skey = mw.ustring.gsub(skey, '^;', '') skey = mw.text.encode(mw.text.encode(skey),'%c%[%]=') if (mw.ustring.match(';' .. ts, ';background:') or mw.ustring.match(';' .. ts, ';background%-color:')) and mw.ustring.match(';' .. ts, ';text%-align:') then return '[[Category:Pages using collapsible list with both background and text-align in titlestyle|' .. skey .. ' ]]' end return '[[Category:Pages using collapsible list without both background and text-align in titlestyle|' .. skey .. ' ]]' end local function getListItem( data ) if not type( data ) == 'string' then return '' end return mw.ustring.format( '<li style="line-height: inherit; margin: 0">%s</li>', data ) end -- Returns an array containing the keys of all positional arguments -- that contain data (i.e. non-whitespace values). local function getArgNums( args ) local nums = {} for k, v in pairs( args ) do if type( k ) == 'number' and k >= 1 and math.floor( k ) == k and type( v ) == 'string' and mw.ustring.match( v, '%S' ) then table.insert( nums, k ) end end table.sort( nums ) return nums end -- Formats a list of classes, styles or other attributes. local function formatAttributes( attrType, ... ) local attributes = { ... } local nums = getArgNums( attributes ) local t = {} for i, num in ipairs( nums ) do table.insert( t, attributes[ num ] ) end if #t == 0 then return '' -- Return the blank string so concatenation will work. end return mw.ustring.format( ' %s="%s"', attrType, table.concat( t, ' ' ) ) end local function buildList( args ) -- Get the list items. local listItems = {} local argNums = getArgNums( args ) for i, num in ipairs( argNums ) do table.insert( listItems, getListItem( args[ num ] ) ) end if #listItems == 0 then return '' end listItems = table.concat( listItems ) -- hack around mw-collapsible show/hide jumpiness by looking for text-alignment -- by setting a margin if centered local textAlignmentCentered = 'text%-align%s*:%s*center' local centeredTitle = (args.title_style and args.title_style:lower():match(textAlignmentCentered) or args.titlestyle and args.titlestyle:lower():match(textAlignmentCentered)) local centeredTitleSpacing if centeredTitle then centeredTitleSpacing = 'margin: 0 4em' else centeredTitleSpacing = '' end -- Get class, style and title data. local collapsibleContainerClass = formatAttributes( 'class', 'mw-collapsible', not args.expand and 'mw-collapsed' ) local collapsibleContainerStyle = formatAttributes( 'style', 'text-align: center; font-size: 95%;', args.frame_style, args.framestyle ) local collapsibleTitleStyle = formatAttributes( 'style', 'line-height: 1.6em; font-weight: bold; font-size: 100%; text-align: left;', args.title_style, args.titlestyle ) local jumpyTitleStyle = formatAttributes( 'style', centeredTitleSpacing ) local title = args.title or 'List' local ulclass = formatAttributes( 'class', 'mw-collapsible-content', args.hlist and 'hlist' ) local ulstyle = formatAttributes( 'style', 'font-size: 105%; margin-top: 0; margin-bottom: 0; line-height: inherit; text-align: left;', not args.bullets and 'list-style: none none; margin-left: 0;', args.list_style, args.liststyle ) -- Build the list. return mw.ustring.format( '<div%s%s>\n<div%s><div%s>%s</div></div>\n<ul%s%s>%s</ul>\n</div>', collapsibleContainerClass, collapsibleContainerStyle, collapsibleTitleStyle, jumpyTitleStyle, title, ulclass, ulstyle, listItems ) .. gettitlestyletracking(args.title_style or args.titlestyle) end function p.main( frame ) local origArgs if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args for k, v in pairs( frame.args ) do origArgs = frame.args break end else origArgs = frame end local args = {} for k, v in pairs( origArgs ) do if type( k ) == 'number' or v ~= '' then args[ k ] = v end end return buildList( args ) end return p 84740cb2c6d397d94048903cb285933cab1b4f5d Template:Template link 10 33 61 2021-03-25T19:03:22Z en>Izno 0 [[Wikipedia:Templates for discussion/Log/2021 March 18#Template:Tlu]] closed as keep ([[WP:XFDC#4.0.11|XFDcloser]]) wikitext text/x-wiki &#123;&#123;[[Template:{{{1}}}|{{{1}}}]]&#125;&#125;<noinclude>{{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> eabbec62efe3044a98ebb3ce9e7d4d43c222351d Template:Documentation 10 11 139 2021-04-13T17:20:38Z en>MrJaroslavik 0 [[Category:Templates]] wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude>[[Category:Templates]]</noinclude> 9885bb4fa99bf3d5b960e73606bbb8eed3026877 Module:If preview/configuration 828 178 452 2021-05-05T18:56:00Z en>Izno 0 Protected "[[Module:If preview/configuration]]": match parent ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) Scribunto text/plain --[[ We perform the actual check for whether this is a preview here since preprocessing is relatively expensive. ]] local frame = mw.getCurrentFrame() local function is_preview() local revision_id = frame:preprocess('{{REVISIONID}}') -- {{REVISIONID}} is usually the empty string when previewed. -- I don't know why we're checking for nil but hey, maybe someday things -- would have broken return revision_id == nil or revision_id == '' end local function templatestyles() return frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:If preview/styles.css' } } end return { preview = is_preview(), templatestyles = templatestyles(), warning_infrastructure = '%s<div class="preview-warning"><strong>Preview warning:</strong> %s</div>', missing_warning = 'The template has no warning text. Please add a warning.' } 3edc8897c51a61b9e710b2a4d9eb657b3c2f1034 Module:If preview/styles.css 828 179 454 2021-05-05T18:56:47Z en>Izno 0 pp sanitized-css text/css /* {{pp|small=yes}} */ .preview-warning { font-style: italic; /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; color: red; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .preview-warning + link + .preview-warning { margin-top: -0.5em; } 8b79ffc4853d424a805b084de00030e04bbd573e Module:If preview 828 177 446 2021-05-05T19:01:42Z en>Izno 0 merge in functionality from [[Module:Preview warning]] and add TemplateStyles, remove p.boolean as not necessary, move some stuff into a cfg page, and don't return temporaries in p.main, remove use Scribunto text/plain local p = {} local cfg = mw.loadData('Module:If preview/configuration') --[[ main This function returns either the first argument or second argument passed to this module, depending on whether the page is being previewed. ]] function p.main(frame) if cfg.preview then return frame.args[1] or '' else return frame.args[2] or '' end end --[[ pmain This function returns either the first argument or second argument passed to this module's parent (i.e. template using this module), depending on whether it is being previewed. ]] function p.pmain(frame) return p.main(frame:getParent()) end local function warning_text(warning) return mw.ustring.format( cfg.warning_infrastructure, cfg.templatestyles, warning ) end function p._warning(args) local warning = args[1] and args[1]:match('^%s*(.-)%s*$') or '' if warning == '' then return warning_text(cfg.missing_warning) end if not cfg.preview then return '' end return warning_text(warning) end --[[ warning This function returns a "preview warning", which is the first argument marked up with HTML and some supporting text, depending on whether the page is being previewed. disabled since we'll implement the template version in general ]] --function p.warning(frame) -- return p._warning(frame.args) --end --[[ warning, but for pass-through templates like {{preview warning}} ]] function p.pwarning(frame) return p._warning(frame:getParent().args) end return p 9a92196d0001b8016f2501aedfadcc3adcb974ef Template:Collapse bottom 10 8 11 2021-05-14T12:42:57Z en>Xaosflux 0 inc only wikitext text/x-wiki <includeonly>|}</div></includeonly><noinclude> {{Documentation|Template:Collapse top/doc}} <!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> </noinclude> 64b210e8ab0882b262da50e9fbccf2132bc34fab Template:Category link with count 10 80 212 2021-06-11T18:13:44Z en>GKFX 0 Support wider range of (valid) input format wikitext text/x-wiki [[:Category:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}|<!-- -->{{#if:{{{name|}}}|{{{name}}}|Category:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}}}<!-- -->]]&nbsp;({{PAGESINCATEGORY:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}|{{{2|all}}}}})<noinclude> {{Documentation}} </noinclude> f93f1540b8c157703bd6d24ae35c35bef745981d Template:Auto italic title 10 210 586 2021-06-24T20:04:36Z en>Gonnym 0 wikitext text/x-wiki {{ombox | type = notice | text = This {{{2|infobox}}} should [[Wikipedia:Article titles#Italics and other formatting|italicize the article title]] automatically. If this is not required, add {{para|{{#if:{{{1|}}}|{{{1}}}|italic title}}|{{#if:{{{3|}}}|{{{3}}}|no}}}} to the list of parameters. {{#if: {{{short|}}} | | If this is required but the title is not being italicized, try {{para|{{#if:{{{1|}}}|{{{1}}}|italic title}}|force}}.}} }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 6dc78a3d3de470bea8dc684b3278f5806fe0f5c3 Template:Navbox 10 86 224 2021-06-26T18:05:09Z en>Trialpears 0 Remove TfD notice as it wouldn't involve any changes to this template. wikitext text/x-wiki <includeonly>{{#invoke:Navbox|navbox}}</includeonly><noinclude> {{Documentation}} </noinclude> fe9b964401f895918ee4fe078678f1722a3c41ec Module:If preview/doc 828 180 472 2021-07-11T23:22:15Z en>Izno 0 lua below high use wikitext text/x-wiki {{Module rating|protected}} {{High-use}} {{Lua|Module:If preview/configuration}} {{Uses TemplateStyles|Module:If preview/styles.css}} This module implements {{tl|if preview}} and {{tl|preview warning}}. It helps templates/modules determine if they are being previewed. Prefer implementing the template versions in other templates. In a module to use the <code>main()</code>, you need to pass a frame table with an args table. For the preview warning, use <code>_warning()</code>. <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | <!-- Categories below this line, please; interwikis at Wikidata --> }}</includeonly> b3f3d514daf6896569d1eeaae47893b228163661 Module:Protection banner 828 59 113 2021-07-16T11:59:29Z en>ProcrastinatingReader 0 add catonly param which hides both the banner and padlock if set to yes. all testcases pass. tested in sandbox. Scribunto text/plain -- This module implements {{pp-meta}} and its daughter templates such as -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. -- Initialise necessary modules. require('Module:No globals') local makeFileLink = require('Module:File link')._main local effectiveProtectionLevel = require('Module:Effective protection level')._main local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main local yesno = require('Module:Yesno') -- Lazily initialise modules and objects we don't always need. local getArgs, makeMessageBox, lang -- Set constants. local CONFIG_MODULE = 'Module:Protection banner/config' -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function makeCategoryLink(cat, sort) if cat then return string.format( '[[%s:%s|%s]]', mw.site.namespaces[14].name, cat, sort ) end end -- Validation function for the expiry and the protection date local function validateDate(dateString, dateType) if not lang then lang = mw.language.getContentLanguage() end local success, result = pcall(lang.formatDate, lang, 'U', dateString) if success then result = tonumber(result) if result then return result end end error(string.format( 'invalid %s: %s', dateType, tostring(dateString) ), 4) end local function makeFullUrl(page, query, display) return string.format( '[%s %s]', tostring(mw.uri.fullUrl(page, query)), display ) end -- Given a directed graph formatted as node -> table of direct successors, -- get a table of all nodes reachable from a given node (though always -- including the given node). local function getReachableNodes(graph, start) local toWalk, retval = {[start] = true}, {} while true do -- Can't use pairs() since we're adding and removing things as we're iterating local k = next(toWalk) -- This always gets the "first" key if k == nil then return retval end toWalk[k] = nil retval[k] = true for _,v in ipairs(graph[k]) do if not retval[v] then toWalk[v] = true end end end end -------------------------------------------------------------------------------- -- Protection class -------------------------------------------------------------------------------- local Protection = {} Protection.__index = Protection Protection.supportedActions = { edit = true, move = true, autoreview = true, upload = true } Protection.bannerConfigFields = { 'text', 'explanation', 'tooltip', 'alt', 'link', 'image' } function Protection.new(args, cfg, title) local obj = {} obj._cfg = cfg obj.title = title or mw.title.getCurrentTitle() -- Set action if not args.action then obj.action = 'edit' elseif Protection.supportedActions[args.action] then obj.action = args.action else error(string.format( 'invalid action: %s', tostring(args.action) ), 3) end -- Set level obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title) if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then -- Users need to be autoconfirmed to move pages anyway, so treat -- semi-move-protected pages as unprotected. obj.level = '*' end -- Set expiry local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title) if effectiveExpiry == 'infinity' then obj.expiry = 'indef' elseif effectiveExpiry ~= 'unknown' then obj.expiry = validateDate(effectiveExpiry, 'expiry date') end -- Set reason if args[1] then obj.reason = mw.ustring.lower(args[1]) if obj.reason:find('|') then error('reasons cannot contain the pipe character ("|")', 3) end end -- Set protection date if args.date then obj.protectionDate = validateDate(args.date, 'protection date') end -- Set banner config do obj.bannerConfig = {} local configTables = {} if cfg.banners[obj.action] then configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason] end if cfg.defaultBanners[obj.action] then configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level] configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default end configTables[#configTables + 1] = cfg.masterBanner for i, field in ipairs(Protection.bannerConfigFields) do for j, t in ipairs(configTables) do if t[field] then obj.bannerConfig[field] = t[field] break end end end end return setmetatable(obj, Protection) end function Protection:isUserScript() -- Whether the page is a user JavaScript or CSS page. local title = self.title return title.namespace == 2 and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) end function Protection:isProtected() return self.level ~= '*' end function Protection:shouldShowLock() -- Whether we should output a banner/padlock return self:isProtected() and not self:isUserScript() end -- Whether this page needs a protection category. Protection.shouldHaveProtectionCategory = Protection.shouldShowLock function Protection:isTemporary() return type(self.expiry) == 'number' end function Protection:makeProtectionCategory() if not self:shouldHaveProtectionCategory() then return '' end local cfg = self._cfg local title = self.title -- Get the expiry key fragment. local expiryFragment if self.expiry == 'indef' then expiryFragment = self.expiry elseif type(self.expiry) == 'number' then expiryFragment = 'temp' end -- Get the namespace key fragment. local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace] if not namespaceFragment and title.namespace % 2 == 1 then namespaceFragment = 'talk' end -- Define the order that key fragments are tested in. This is done with an -- array of tables containing the value to be tested, along with its -- position in the cfg.protectionCategories table. local order = { {val = expiryFragment, keypos = 1}, {val = namespaceFragment, keypos = 2}, {val = self.reason, keypos = 3}, {val = self.level, keypos = 4}, {val = self.action, keypos = 5} } --[[ -- The old protection templates used an ad-hoc protection category system, -- with some templates prioritising namespaces in their categories, and -- others prioritising the protection reason. To emulate this in this module -- we use the config table cfg.reasonsWithNamespacePriority to set the -- reasons for which namespaces have priority over protection reason. -- If we are dealing with one of those reasons, move the namespace table to -- the end of the order table, i.e. give it highest priority. If not, the -- reason should have highest priority, so move that to the end of the table -- instead. --]] table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3)) --[[ -- Define the attempt order. Inactive subtables (subtables with nil "value" -- fields) are moved to the end, where they will later be given the key -- "all". This is to cut down on the number of table lookups in -- cfg.protectionCategories, which grows exponentially with the number of -- non-nil keys. We keep track of the number of active subtables with the -- noActive parameter. --]] local noActive, attemptOrder do local active, inactive = {}, {} for i, t in ipairs(order) do if t.val then active[#active + 1] = t else inactive[#inactive + 1] = t end end noActive = #active attemptOrder = active for i, t in ipairs(inactive) do attemptOrder[#attemptOrder + 1] = t end end --[[ -- Check increasingly generic key combinations until we find a match. If a -- specific category exists for the combination of key fragments we are -- given, that match will be found first. If not, we keep trying different -- key fragment combinations until we match using the key -- "all-all-all-all-all". -- -- To generate the keys, we index the key subtables using a binary matrix -- with indexes i and j. j is only calculated up to the number of active -- subtables. For example, if there were three active subtables, the matrix -- would look like this, with 0 corresponding to the key fragment "all", and -- 1 corresponding to other key fragments. -- -- j 1 2 3 -- i -- 1 1 1 1 -- 2 0 1 1 -- 3 1 0 1 -- 4 0 0 1 -- 5 1 1 0 -- 6 0 1 0 -- 7 1 0 0 -- 8 0 0 0 -- -- Values of j higher than the number of active subtables are set -- to the string "all". -- -- A key for cfg.protectionCategories is constructed for each value of i. -- The position of the value in the key is determined by the keypos field in -- each subtable. --]] local cats = cfg.protectionCategories for i = 1, 2^noActive do local key = {} for j, t in ipairs(attemptOrder) do if j > noActive then key[t.keypos] = 'all' else local quotient = i / 2 ^ (j - 1) quotient = math.ceil(quotient) if quotient % 2 == 1 then key[t.keypos] = t.val else key[t.keypos] = 'all' end end end key = table.concat(key, '|') local attempt = cats[key] if attempt then return makeCategoryLink(attempt, title.text) end end return '' end function Protection:isIncorrect() local expiry = self.expiry return not self:shouldHaveProtectionCategory() or type(expiry) == 'number' and expiry < os.time() end function Protection:isTemplateProtectedNonTemplate() local action, namespace = self.action, self.title.namespace return self.level == 'templateeditor' and ( (action ~= 'edit' and action ~= 'move') or (namespace ~= 10 and namespace ~= 828) ) end function Protection:makeCategoryLinks() local msg = self._cfg.msg local ret = {self:makeProtectionCategory()} if self:isIncorrect() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-incorrect'], self.title.text ) end if self:isTemplateProtectedNonTemplate() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-template'], self.title.text ) end return table.concat(ret) end -------------------------------------------------------------------------------- -- Blurb class -------------------------------------------------------------------------------- local Blurb = {} Blurb.__index = Blurb Blurb.bannerTextFields = { text = true, explanation = true, tooltip = true, alt = true, link = true } function Blurb.new(protectionObj, args, cfg) return setmetatable({ _cfg = cfg, _protectionObj = protectionObj, _args = args }, Blurb) end -- Private methods -- function Blurb:_formatDate(num) -- Formats a Unix timestamp into dd Month, YYYY format. lang = lang or mw.language.getContentLanguage() local success, date = pcall( lang.formatDate, lang, self._cfg.msg['expiry-date-format'] or 'j F Y', '@' .. tostring(num) ) if success then return date end end function Blurb:_getExpandedMessage(msgKey) return self:_substituteParameters(self._cfg.msg[msgKey]) end function Blurb:_substituteParameters(msg) if not self._params then local parameterFuncs = {} parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter parameterFuncs.EDITREQUEST = self._makeEditRequestParameter parameterFuncs.EXPIRY = self._makeExpiryParameter parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter parameterFuncs.IMAGELINK = self._makeImageLinkParameter parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter parameterFuncs.PAGETYPE = self._makePagetypeParameter parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter parameterFuncs.TALKPAGE = self._makeTalkPageParameter parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter parameterFuncs.VANDAL = self._makeVandalTemplateParameter self._params = setmetatable({}, { __index = function (t, k) local param if parameterFuncs[k] then param = parameterFuncs[k](self) end param = param or '' t[k] = param return param end }) end msg = msg:gsub('${(%u+)}', self._params) return msg end function Blurb:_makeCurrentVersionParameter() -- A link to the page history or the move log, depending on the kind of -- protection. local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'move' then -- We need the move log link. return makeFullUrl( 'Special:Log', {type = 'move', page = pagename}, self:_getExpandedMessage('current-version-move-display') ) else -- We need the history link. return makeFullUrl( pagename, {action = 'history'}, self:_getExpandedMessage('current-version-edit-display') ) end end function Blurb:_makeEditRequestParameter() local mEditRequest = require('Module:Submit an edit request') local action = self._protectionObj.action local level = self._protectionObj.level -- Get the edit request type. local requestType if action == 'edit' then if level == 'autoconfirmed' then requestType = 'semi' elseif level == 'extendedconfirmed' then requestType = 'extended' elseif level == 'templateeditor' then requestType = 'template' end end requestType = requestType or 'full' -- Get the display value. local display = self:_getExpandedMessage('edit-request-display') return mEditRequest._link{type = requestType, display = display} end function Blurb:_makeExpiryParameter() local expiry = self._protectionObj.expiry if type(expiry) == 'number' then return self:_formatDate(expiry) else return expiry end end function Blurb:_makeExplanationBlurbParameter() -- Cover special cases first. if self._protectionObj.title.namespace == 8 then -- MediaWiki namespace return self:_getExpandedMessage('explanation-blurb-nounprotect') end -- Get explanation blurb table keys local action = self._protectionObj.action local level = self._protectionObj.level local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject' -- Find the message in the explanation blurb table and substitute any -- parameters. local explanations = self._cfg.explanationBlurbs local msg if explanations[action][level] and explanations[action][level][talkKey] then msg = explanations[action][level][talkKey] elseif explanations[action][level] and explanations[action][level].default then msg = explanations[action][level].default elseif explanations[action].default and explanations[action].default[talkKey] then msg = explanations[action].default[talkKey] elseif explanations[action].default and explanations[action].default.default then msg = explanations[action].default.default else error(string.format( 'could not find explanation blurb for action "%s", level "%s" and talk key "%s"', action, level, talkKey ), 8) end return self:_substituteParameters(msg) end function Blurb:_makeImageLinkParameter() local imageLinks = self._cfg.imageLinks local action = self._protectionObj.action local level = self._protectionObj.level local msg if imageLinks[action][level] then msg = imageLinks[action][level] elseif imageLinks[action].default then msg = imageLinks[action].default else msg = imageLinks.edit.default end return self:_substituteParameters(msg) end function Blurb:_makeIntroBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-blurb-expiry') else return self:_getExpandedMessage('intro-blurb-noexpiry') end end function Blurb:_makeIntroFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-fragment-expiry') else return self:_getExpandedMessage('intro-fragment-noexpiry') end end function Blurb:_makePagetypeParameter() local pagetypes = self._cfg.pagetypes return pagetypes[self._protectionObj.title.namespace] or pagetypes.default or error('no default pagetype defined', 8) end function Blurb:_makeProtectionBlurbParameter() local protectionBlurbs = self._cfg.protectionBlurbs local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionBlurbs[action][level] then msg = protectionBlurbs[action][level] elseif protectionBlurbs[action].default then msg = protectionBlurbs[action].default elseif protectionBlurbs.edit.default then msg = protectionBlurbs.edit.default else error('no protection blurb defined for protectionBlurbs.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionDateParameter() local protectionDate = self._protectionObj.protectionDate if type(protectionDate) == 'number' then return self:_formatDate(protectionDate) else return protectionDate end end function Blurb:_makeProtectionLevelParameter() local protectionLevels = self._cfg.protectionLevels local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionLevels[action][level] then msg = protectionLevels[action][level] elseif protectionLevels[action].default then msg = protectionLevels[action].default elseif protectionLevels.edit.default then msg = protectionLevels.edit.default else error('no protection level defined for protectionLevels.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionLogParameter() local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'autoreview' then -- We need the pending changes log. return makeFullUrl( 'Special:Log', {type = 'stable', page = pagename}, self:_getExpandedMessage('pc-log-display') ) else -- We need the protection log. return makeFullUrl( 'Special:Log', {type = 'protect', page = pagename}, self:_getExpandedMessage('protection-log-display') ) end end function Blurb:_makeTalkPageParameter() return string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[self._protectionObj.title.namespace].talk.name, self._protectionObj.title.text, self._args.section or 'top', self:_getExpandedMessage('talk-page-link-display') ) end function Blurb:_makeTooltipBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-blurb-expiry') else return self:_getExpandedMessage('tooltip-blurb-noexpiry') end end function Blurb:_makeTooltipFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-fragment-expiry') else return self:_getExpandedMessage('tooltip-fragment-noexpiry') end end function Blurb:_makeVandalTemplateParameter() return mw.getCurrentFrame():expandTemplate{ title="vandal-m", args={self._args.user or self._protectionObj.title.baseText} } end -- Public methods -- function Blurb:makeBannerText(key) -- Validate input. if not key or not Blurb.bannerTextFields[key] then error(string.format( '"%s" is not a valid banner config field', tostring(key) ), 2) end -- Generate the text. local msg = self._protectionObj.bannerConfig[key] if type(msg) == 'string' then return self:_substituteParameters(msg) elseif type(msg) == 'function' then msg = msg(self._protectionObj, self._args) if type(msg) ~= 'string' then error(string.format( 'bad output from banner config function with key "%s"' .. ' (expected string, got %s)', tostring(key), type(msg) ), 4) end return self:_substituteParameters(msg) end end -------------------------------------------------------------------------------- -- BannerTemplate class -------------------------------------------------------------------------------- local BannerTemplate = {} BannerTemplate.__index = BannerTemplate function BannerTemplate.new(protectionObj, cfg) local obj = {} obj._cfg = cfg -- Set the image filename. local imageFilename = protectionObj.bannerConfig.image if imageFilename then obj._imageFilename = imageFilename else -- If an image filename isn't specified explicitly in the banner config, -- generate it from the protection status and the namespace. local action = protectionObj.action local level = protectionObj.level local namespace = protectionObj.title.namespace local reason = protectionObj.reason -- Deal with special cases first. if ( namespace == 10 or namespace == 828 or reason and obj._cfg.indefImageReasons[reason] ) and action == 'edit' and level == 'sysop' and not protectionObj:isTemporary() then -- Fully protected modules and templates get the special red "indef" -- padlock. obj._imageFilename = obj._cfg.msg['image-filename-indef'] else -- Deal with regular protection types. local images = obj._cfg.images if images[action] then if images[action][level] then obj._imageFilename = images[action][level] elseif images[action].default then obj._imageFilename = images[action].default end end end end return setmetatable(obj, BannerTemplate) end function BannerTemplate:renderImage() local filename = self._imageFilename or self._cfg.msg['image-filename-default'] or 'Transparent.gif' return makeFileLink{ file = filename, size = (self.imageWidth or 20) .. 'px', alt = self._imageAlt, link = self._imageLink, caption = self.imageCaption } end -------------------------------------------------------------------------------- -- Banner class -------------------------------------------------------------------------------- local Banner = setmetatable({}, BannerTemplate) Banner.__index = Banner function Banner.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 40 obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip. obj._reasonText = blurbObj:makeBannerText('text') obj._explanationText = blurbObj:makeBannerText('explanation') obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing. return setmetatable(obj, Banner) end function Banner:__tostring() -- Renders the banner. makeMessageBox = makeMessageBox or require('Module:Message box').main local reasonText = self._reasonText or error('no reason text set', 2) local explanationText = self._explanationText local mbargs = { page = self._page, type = 'protection', image = self:renderImage(), text = string.format( "'''%s'''%s", reasonText, explanationText and '<br />' .. explanationText or '' ) } return makeMessageBox('mbox', mbargs) end -------------------------------------------------------------------------------- -- Padlock class -------------------------------------------------------------------------------- local Padlock = setmetatable({}, BannerTemplate) Padlock.__index = Padlock function Padlock.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 20 obj.imageCaption = blurbObj:makeBannerText('tooltip') obj._imageAlt = blurbObj:makeBannerText('alt') obj._imageLink = blurbObj:makeBannerText('link') obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action] or cfg.padlockIndicatorNames.default or 'pp-default' return setmetatable(obj, Padlock) end function Padlock:__tostring() local frame = mw.getCurrentFrame() -- The nowiki tag helps prevent whitespace at the top of articles. return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{ name = 'indicator', args = {name = self._indicatorName}, content = self:renderImage() } end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- This is used for testing purposes. return { Protection = Protection, Blurb = Blurb, BannerTemplate = BannerTemplate, Banner = Banner, Padlock = Padlock, } end function p._main(args, cfg, title) args = args or {} cfg = cfg or require(CONFIG_MODULE) local protectionObj = Protection.new(args, cfg, title) local ret = {} -- If a page's edit protection is equally or more restrictive than its -- protection from some other action, then don't bother displaying anything -- for the other action (except categories). if not yesno(args.catonly) and (protectionObj.action == 'edit' or args.demolevel or not getReachableNodes( cfg.hierarchy, protectionObj.level )[effectiveProtectionLevel('edit', protectionObj.title)]) then -- Initialise the blurb object local blurbObj = Blurb.new(protectionObj, args, cfg) -- Render the banner if protectionObj:shouldShowLock() then ret[#ret + 1] = tostring( (yesno(args.small) and Padlock or Banner) .new(protectionObj, blurbObj, cfg) ) end end -- Render the categories if yesno(args.category) ~= false then ret[#ret + 1] = protectionObj:makeCategoryLinks() end return table.concat(ret) end function p.main(frame, cfg) cfg = cfg or require(CONFIG_MODULE) -- Find default args, if any. local parent = frame.getParent and frame:getParent() local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')] -- Find user args, and use the parent frame if we are being called from a -- wrapper template. getArgs = getArgs or require('Module:Arguments').getArgs local userArgs = getArgs(frame, { parentOnly = defaultArgs, frameOnly = not defaultArgs }) -- Build the args table. User-specified args overwrite default args. local args = {} for k, v in pairs(defaultArgs or {}) do args[k] = v end for k, v in pairs(userArgs) do args[k] = v end return p._main(args, cfg) end return p b24b049f70572e29b1a408a5a11045d65118e43c Template:UF-hcard-org 10 95 244 2021-08-02T18:52:40Z en>Sdkb 0 adding option to replace "start date and age" with just "start date" wikitext text/x-wiki {{Microformat message | format = hCard | data = an organization's details | subtemplates = * Use {{#ifeq:{{yesno-yes|{{{age|}}}}}|yes|{{tl|Start date and age}}|{{tl|Start date}}}} for the date on which an organisation was "established", "founded", "opened" or otherwise started, [[Wikipedia:WikiProject Microformats/dates|unless that date is before 1583&nbsp;CE]]. * Use {{tl|URL}} for an organisation's URL. |adr |agent |category |country-name |extended-address |fn |geo |label |latitude |locality |longitude |nickname |note |org |region |street-address |url |vcard | nocollapse = on }}<includeonly>{{sandbox other|| [[Category:Templates generating hCards]] }}</includeonly><noinclude> {{Documentation |content={{Microformat message templates}}}} [[Category:Microformat (uF) message templates]] [[Category:Templates generating hCards| ]] </noinclude> 631bc99cd046167681b6eb518559d92fc65a4920 Template:Hidden begin 10 13 21 2021-08-05T04:32:46Z en>Izno 0 people who put hatnotes in template pages smh wikitext text/x-wiki <includeonly><div class="mw-collapsible {{#ifeq:{{{showhide|}}}{{{toggle|}}}|left|mw-collapsible-leftside-toggle}} {{#if:{{{expanded|}}} | |mw-collapsed}} {{{class|}}}" style="box-sizing:border-box;width:{{{width|100%}}};font-size:95%;padding:4px;border:{{{border|none}}};{{{style|}}}"><!-- --><div style="font-size:100%;line-height:1.6;font-weight:bold;background:{{{bg1|transparent}}};text-align:{{{ta1|left}}};{{{extra1|}}};{{{titlestyle|{{{headercss|}}}}}}">{{{header|}}}{{{title|}}}</div><!-- --><div class="mw-collapsible-content" style="background:{{{bg2|transparent}}};text-align:{{{ta2|left}}};{{{extra2|}}};{{{bodystyle|{{{contentstyle|{{{contentcss|}}}}}}}}}"></includeonly><noinclude> {{Documentation}} </noinclude> f2cf6827b1f6c54d325bd1bfb6d6a63fbf979b40 Template:Infobox court case 10 192 522 2021-08-08T04:28:15Z en>Goszei 0 ensure proper sizing on mobile wikitext text/x-wiki {{#invoke:infobox|infoboxTemplate | italic title = {{{italic title|<noinclude>no</noinclude>}}} | bodyclass = scotus | above = {{if empty| {{{name|}}} | {{{Litigants|}}} | <includeonly>{{PAGENAMEBASE}}</includeonly> }} | abovestyle = font-style: italic; font-size: 125%; | aboveclass = fn | image = {{#invoke:InfoboxImage|InfoboxImage|image={{if empty |{{{image|}}} |{{Infobox court case/images|courtimage={{{court}}}|date={{{date decided|}}} }} |{{{CourtSeal|}}} }}|size={{{imagesize|}}}|sizedefault=frameless|upright={{{image_upright|0.82}}}|link={{{imagelink|}}}|alt={{{imagealt|}}} }} | caption = {{{caption|}}} | headerstyle = white-space:nowrap | label1 = Court | data1 = {{{CourtName|{{{Court|{{{court|}}} }}} }}} | label2 = Full case name | data2 = {{#if: {{{FullName|{{{full name|}}} }}} | ''{{{FullName|{{{full name|}}} }}}'' }} | label3 = Argued | data3 = {{#if:{{{ArgueDate|}}} | {{{ArgueDate}}}{{#if:{{{ArgueDateB|}}}|,&#32;{{{ArgueDateB}}} }}{{#if:{{{ArgueDateC|}}}|–{{{ArgueDateC}}} }} {{{ArgueYear|}}} }}{{#if:{{{ArgueDateA|}}} | {{#iferror:{{#expr:{{{ArgueDateB}}}+1}} | {{{ArgueDateA}}}&nbsp;–&nbsp;{{{ArgueDateB}}} {{{ArgueYear|}}} | {{{ArgueDateA}}}–{{{ArgueDateB}}} {{{ArgueYear|}}} }} }} | label4 = Reargued | data4 = {{#if:{{{ReargueDate|}}} | {{{ReargueDate}}} {{{ReargueYear|}}} }}{{#if:{{{ReargueDateA|}}} | {{{ReargueDateA}}}–{{{ReargueDateB}}} {{{ReargueYear|}}} }}{{#if:{{{ReargueDate2|}}} | {{{ReargueDate2}}} {{{ReargueYear2|}}} }}{{#if:{{{ReargueDateA2|}}} | {{{ReargueDateA2}}}–{{{ReargueDateB2}}} {{{ReargueYear2|}}} }} | label5 = Submitted | data5 = {{{SubmitDate|}}} {{{SubmitYear|}}} | label6 = [[Indictment]] | data6 = {{{indictment|}}} | label7 = Started | data7 = {{{start_date|{{{start date|}}}}}} | label8 = Decided | data8 = {{{DecideDate|{{{date_decided|{{{date decided|}}} }}} }}} {{{DecideYear|}}} | label9 = Docket nos. | data9 = {{{docket|}}} | label10 = Verdict | data10 = {{{verdict|}}} | label11 = Defendant | data11 = {{{defendant|}}} | label12 = Charge | data12 = {{{charge|}}} | label13 = Prosecution | data13 = {{{prosecution|{{{prosecutor|}}}}}} | label14 = Counsel for plaintiff(s) | data14 = {{{counsel for plaintiff|}}} | label15 = Plaintiff(s) | data15 = {{{plaintiff|}}} | label16 = {{#if:{{{defense|}}}|Defense|Defence}} | data16 = {{{defence|{{{defense|}}} }}} | label17 = Citation(s) | data17 = {{{Citation|{{{citations|{{{Citations|{{{CitationNew|}}} }}} }}} }}} | label18 = [[European Case Law Identifier|ECLI]] | data18 = {{{ECLI|}}} | label19 = Neutral citation | data19 = {{{Neutral Citation|}}} | label20 = Reported at | data20 = {{{Other Citations|}}} | label21 = {{nowrap|Transcript(s)}} | data21 = {{{transcripts|}}} | label22 = Claim | data22 = {{{Claim|}}} | label23 = Cases cited | data23 = {{{Cases_cited|}}} | label24 = Legislation cited | data24 = {{{Legislation_cited|}}} | header27 = {{#if: {{{prior_actions|{{{prior actions|}}} }}} {{{Prior|}}} {{{appealed from|}}} {{{appealed to|}}} {{{subsequent_actions|{{{subsequent actions|}}} }}} {{{Subsequent|}}} {{{Procedural|}}} {{{Related|}}} {{{related actions|}}} | Case history }} | label28 = {{#if: {{{Prior|}}} | Prior history | Prior action(s) }} | data28 = {{#if: {{{Prior|}}} | {{{Prior|}}} | {{{prior_actions|{{{prior actions|}}} }}} }} | label29 = Appealed from | data29 = {{{appealed from|}}} | label30 = Appealed to | data30 = {{{appealed to|}}} | label31 = {{#if: {{{Subsequent|}}} | Subsequent history | Subsequent action(s) }} | data31 = {{#if: {{{Subsequent|}}} | {{{Subsequent|}}} | {{{subsequent_actions|{{{subsequent actions|}}} }}} }} | label32 = Procedural history | data32 = {{{Procedural|}}} | label33 = {{#if: {{{Related|}}} | Related cases | Related action(s) }} | data33 = {{#if: {{{Related|}}} | {{{Related|}}} | {{{related actions|}}} }} | label34 = Argument | data34 = {{#if:{{{OralArgument|}}}|[{{{OralArgument}}} Oral argument]|{{#if:{{{OralArguments|}}}|{{{OralArguments}}}}}}} | label35 = Reargument | data35 = {{#if:{{{OralReargument|}}}|[{{{OralReargument}}} Reargument]}} | label36 = Opinion announcement | data36 = {{#if:{{{OpinionAnnouncement|}}}|[{{{OpinionAnnouncement}}} Opinion announcement]}} | header42 = {{#if: {{{Outcome|}}} | Outcome | {{#if:{{{QuestionsPresented|}}} | Questions presented | {{#if: {{{Holding|{{{holding|}}} }}} | Holding | {{#if: {{{Ruling|}}} | Ruling | {{#if: {{{opinions|}}} | Case opinions }} }} }} }} }} | data43 = {{if empty|{{{Outcome|}}}|{{{QuestionsPresented|}}}|{{{Holding|{{{holding|}}} }}}|{{{Ruling|}}}|{{{opinions|}}}}} | header47 = {{#if: {{{judges|{{{Judges|{{{Membership|{{{judge|}}} }}} }}} }}} {{{ChiefJudge|}}} {{{AssociateJudges|}}} | Court membership }} | label48 = {{#if:{{{number of judges|}}} | {{#switch: {{{number of judges|}}} | 1 = Judge sitting | Judges sitting }} | Judge(s) sitting}} | data48 = {{{judges|{{{Judges|{{{Membership|{{{judge|}}} }}} }}} }}} | label49 = {{#if: {{{ChiefJudgeTitle|}}} | {{{ChiefJudgeTitle}}} | Chief judge }} | data49 = {{{ChiefJudge|}}} | label50 = {{#if: {{{AssociateJudgesTitle|}}} | {{{AssociateJudgesTitle}}} | Associate judges }} | data50 = {{{AssociateJudges|}}} | header51 = {{#if: {{{decision by|}}}{{{Majority|}}}{{{Plurality|}}}{{{PerCuriam|}}}{{{Dissent|}}}{{{Concurrence|}}} | Case opinions }} | data52 = {{#if: {{{QuestionsPresented|}}} | | {{#if:{{{PerCuriam|}}}|''{{lang|la|Per curiam}}''}} }} | label53 = Decision by | data53 = {{{decision by|}}} | label54 = Majority | data54 = {{{Majority|}}}{{#if:{{{JoinMajority|}}}|, joined {{#ifeq:{{{JoinMajority}}}|unanimously||by }} {{{JoinMajority}}} }} | label55 = Majority | data55 = {{{Majority2|}}}{{#if:{{{JoinMajority2|}}}|, joined by {{{JoinMajority2}}} }} | label56 = Majority | data56 = {{{Majority3|}}}{{#if:{{{JoinMajority3|}}}|, joined by {{{JoinMajority3}}} }} | label57 = Plurality | data57 = {{{Plurality|}}}{{#if:{{{JoinPlurality|}}}|, joined by {{{JoinPlurality}}} }} | label58 = Plurality | data58 = {{{Plurality2|}}}{{#if:{{{JoinPlurality2|}}}|, joined by {{{JoinPlurality2}}} }} | label59 = Plurality | data59 = {{{Plurality3|}}}{{#if:{{{JoinPlurality3|}}}|, joined by {{{JoinPlurality3}}} }} | label60 = Plurality | data60 = {{{Plurality4|}}}{{#if:{{{JoinPlurality4|}}}|, joined by {{{JoinPlurality4}}} }} | label61 = Seriatim opinion | data61 = {{{Seriatim|}}} | label62 = Seriatim opinion | data62 = {{{Seriatim2|}}} | label63 = Seriatim opinion | data63 = {{{Seriatim3|}}} | label64 = Seriatim opinion | data64 = {{{Seriatim4|}}} | label65 = Seriatim opinion | data65 = {{{Seriatim5|}}} | label66 = Concurrence | data66 = {{{concurring|{{{Concurrence|}}}}}}{{#if:{{{JoinConcurrence|}}}|, joined by {{{JoinConcurrence}}}}} | label67 = Concurrence | data67 = {{{Concurrence2|}}}{{#if:{{{JoinConcurrence2|}}}|, joined by {{{JoinConcurrence2}}}}} | label68 = Concurrence | data68 = {{{Concurrence3|}}}{{#if:{{{JoinConcurrence3|}}}|, joined by {{{JoinConcurrence3}}}}} | label69 = Concurrence | data69 = {{{Concurrence4|}}}{{#if:{{{JoinConcurrence4|}}}|, joined by {{{JoinConcurrence4}}}}} | label70 = Concurrence | data70 = {{{Concurrence5|}}}{{#if:{{{JoinConcurrence5|}}}|, joined by {{{JoinConcurrence5}}}}} | label71 = Concurrence | data71 = {{{Concurrence6|}}}{{#if:{{{JoinConcurrence6|}}}|, joined by {{{JoinConcurrence6}}}}} | label72 = Concurrence | data72 = {{{Concurrence7|}}}{{#if:{{{JoinConcurrence7|}}}|, joined by {{{JoinConcurrence7}}}}} | label73 = Concurrence | data73 = {{{Concurrence8|}}}{{#if:{{{JoinConcurrence8|}}}|, joined by {{{JoinConcurrence8}}}}} | label74 = Concur/dissent | data74 = {{{Concur/dissent|{{{Concurrence/Dissent|{{{concur/dissent|}}}}}}}}}{{#if:{{{JoinConcurrence/Dissent|}}}|, joined by {{{JoinConcurrence/Dissent}}}}} | label75 = Concur/dissent | data75 = {{{Concurrence/Dissent2|}}}{{#if:{{{JoinConcurrence/Dissent2|}}}|, joined by {{{JoinConcurrence/Dissent2}}}}} | label76 = Concur/dissent | data76 = {{{Concurrence/Dissent3|}}}{{#if:{{{JoinConcurrence/Dissent3|}}}|, joined by {{{JoinConcurrence/Dissent3}}}}} | label77 = Concur/dissent | data77 = {{{Concurrence/Dissent4|}}}{{#if:{{{JoinConcurrence/Dissent4|}}}|, joined by {{{JoinConcurrence/Dissent4}}}}} | label78 = Concur/dissent | data78 = {{{Concurrence/Dissent5|}}}{{#if:{{{JoinConcurrence/Dissent5|}}}|, joined by {{{JoinConcurrence/Dissent5}}}}} | label79 = Concur/dissent | data79 = {{{Concurrence/Dissent6|}}}{{#if:{{{JoinConcurrence/Dissent6|}}}|, joined by {{{JoinConcurrence/Dissent6}}}}} | label80 = Concur/dissent | data80 = {{{Concurrence/Dissent7|}}}{{#if:{{{JoinConcurrence/Dissent7|}}}|, joined by {{{JoinConcurrence/Dissent7}}}}} | label81 = Concur/dissent | data81 = {{{Concurrence/Dissent8|}}}{{#if:{{{JoinConcurrence/Dissent8|}}}|, joined by {{{JoinConcurrence/Dissent8}}}}} | label82 = Dissent | data82 = {{{dissenting|{{{Dissent|}}}}}}{{#if:{{{JoinDissent|}}}|, joined by {{{JoinDissent}}}}} | label83 = Concurrence | data83 = {{{ConcurrenceDissent|}}} | label84 = Dissent | data84 = {{{Dissent2|}}}{{#if:{{{JoinDissent2|}}}|, joined by {{{JoinDissent2}}}}} | label85 = Concurrence | data85 = {{{ConcurrenceDissent2|}}} | label86 = Dissent | data86 = {{{Dissent3|}}}{{#if:{{{JoinDissent3|}}}|, joined by {{{JoinDissent3}}}}} | label87 = Concurrence | data87 = {{{ConcurrenceDissent3|}}} | label88 = Dissent | data88 = {{{Dissent4|}}}{{#if:{{{JoinDissent4|}}}|, joined by {{{JoinDissent4}}}}} | label89 = Concurrence | data89 = {{{ConcurrenceDissent4|}}} | label90 = Dissent | data90 = {{{Dissent5|}}}{{#if:{{{JoinDissent5|}}}|, joined by {{{JoinDissent5}}}}} | data91 = {{#if:{{{NotParticipating|}}}|<small>{{{NotParticipating}}} took no part in the consideration or decision of the case.</small>}} | header97 = {{#if: {{{LawsApplied|{{{laws_applied|}}} }}} | Laws applied }} | data98 = {{{LawsApplied|{{{laws_applied|}}} }}} | data99 = {{#if:{{{Superseded|}}}|<div style="background-color: red; color: white; font-weight: bold">Superseded by</div>}} | data100 = {{{Superseded|}}} | data101 = {{#if:{{{Overruled|}}}|<div style="background-color: red; color: white; font-weight: bold">Overruled by</div>}} | data102 = {{{Overruled|}}} | data103 = {{#if:{{{Overturned previous case|}}}|<div style="background-color: green; color: white; font-weight: bold">This case overturned a previous ruling</div>}} | data104 = {{{Overturned previous case|}}} | data105 = {{#if:{{{Abrogated|}}}|<div style="background-color: red; color: white; font-weight: bold">Abrogated by</div>}} | data106 = {{{Abrogated|}}} | header107 = {{#if: {{{Keywords|{{{keywords|}}} }}} | Keywords | {{#if: {{{Area of Law|{{{area of law|}}}}}} | Area of law }} }} | data108 = {{{Keywords|{{{keywords|{{{Area of Law|{{{area of law|}}}}}} }}} }}} }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox court case with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox court case]] with unknown parameter "_VALUE_"|ignoreblank=y| Abrogated | appealed from | appealed to | Area of Law | ArgueDate | ArgueDateA | ArgueDateB | ArgueDateC | ArgueYear | AssociateJudges | AssociateJudgesTitle | caption | Cases_cited | charge | ChiefJudge | ChiefJudgeTitle | Citation | CitationNew | citations | Citations | Claim | concur/dissent | Concur/dissent | Concurrence | Concurrence/Dissent | Concurrence/Dissent2 | Concurrence/Dissent3 | Concurrence/Dissent4 | Concurrence/Dissent5 | Concurrence/Dissent6 | Concurrence/Dissent7 | Concurrence/Dissent8 | Concurrence2 | Concurrence3 | Concurrence4 | Concurrence5 | Concurrence6 | Concurrence7 | Concurrence8 | ConcurrenceDissent | ConcurrenceDissent2 | ConcurrenceDissent3 | ConcurrenceDissent4 | concurring | counsel for plaintiff | court | Court | CourtName | CourtSeal | date decided | date_decided | DecideDate | DecideYear | decision by | defence | defense | defendant | Dissent | Dissent2 | Dissent3 | Dissent4 | Dissent5 | dissenting | docket | ECLI | full name | FullName | Holding | holding | image | image_upright | imagealt | imagelink | imagesize | indictment | italic title | JoinConcurrence | JoinConcurrence/Dissent | JoinConcurrence/Dissent2 | JoinConcurrence/Dissent3 | JoinConcurrence/Dissent4 | JoinConcurrence/Dissent5 | JoinConcurrence/Dissent6 | JoinConcurrence/Dissent7 | JoinConcurrence/Dissent8 | JoinConcurrence2 | JoinConcurrence3 | JoinConcurrence4 | JoinConcurrence5 | JoinConcurrence6 | JoinConcurrence7 | JoinConcurrence8 | JoinDissent | JoinDissent2 | JoinDissent3 | JoinDissent4 | JoinDissent5 | JoinMajority | JoinMajority2 | JoinMajority3 | JoinPlurality | JoinPlurality2 | JoinPlurality3 | JoinPlurality4 | judge | judges | Judges | Keywords | keywords | laws_applied | LawsApplied | Legislation_cited | Litigants | Majority | Majority2 | Majority3 | Membership | name | Neutral Citation | NotParticipating | number of judges | OpinionAnnouncement | opinions | OralArgument | OralArguments | OralReargument | Other Citations | Outcome | Overruled | Overturned previous case | PerCuriam | plaintiff | Plurality | Plurality2 | Plurality3 | Plurality4 | Prior | prior actions | prior_actions | Procedural | prosecution | prosecutor | QuestionsPresented | ReargueDate | ReargueDate2 | ReargueDateA | ReargueDateA2 | ReargueDateB | ReargueDateB2 | ReargueYear | ReargueYear2 | Related | related actions | Ruling | Seriatim | Seriatim2 | Seriatim3 | Seriatim4 | Seriatim5 | start date | start_date | SubmitDate | SubmitYear | Subsequent | subsequent actions | subsequent_actions | Superseded | transcripts | verdict }}<noinclude>{{Documentation}}<!-- Please place category links in [[Template:Infobox court case/doc]], and interwikis on Wikidata.--> </noinclude> 0edf8542bd012748593e78913b9085f87691d98d Module:Documentation/styles.css 828 45 181 85 2021-08-10T11:09:38Z en>Anaaxes 0 1 revision imported text text/plain /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } ce0e629c92e3d825ab9fd927fe6cc37d9117b6cb Module:Navbar/configuration 828 76 187 2021-08-10T11:09:38Z en>Anaaxes 0 1 revision imported Scribunto text/plain local configuration = { ['templatestyles'] = 'Module:Navbar/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['this_box'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } return configuration 7f1b6300bc4a690ecfb1c83b582f36c603bd1dff 256 187 2021-11-13T05:39:10Z en>Izno 0 well, since I edited the other one... Scribunto text/plain return { ['templatestyles'] = 'Module:Navbar/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['this_box'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } bbf3d86b48a5b40835e8e232ae9821e6bca390ec Template:Infobox 10 17 167 29 2021-08-10T11:15:52Z en>Anaaxes 0 1 revision imported wikitext text/x-wiki {{#invoke:Infobox|infobox}}<includeonly>{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Category:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}</includeonly><noinclude> {{documentation}} <!-- Categories go in the /doc subpage, and interwikis go in Wikidata. --> </noinclude> 817a9f5b6524eced06a57bd1d5fd7179f9369bf2 Template:Remove first word 10 27 195 49 2021-08-10T11:15:55Z en>Anaaxes 0 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:String|replace|source={{{1}}}|pattern=^[^{{{sep|%s}}}]*{{{sep|%s}}}*|replace=|plain=false}}<noinclude>{{Documentation}}</noinclude> df7a9e692f68be1581be06af5f51eaed5483b4c8 Module:InfoboxImage 828 52 203 2021-08-11T08:22:09Z en>Anaaxes 0 Undo imported revision 14516 by user LOP>WOSlinker Scribunto text/plain -- Inputs: -- image - Can either be a bare filename (with or without the File:/Image: prefix) or a fully formatted image link -- page - page to display for multipage images (DjVu) -- size - size to display the image -- maxsize - maximum size for image -- sizedefault - default size to display the image if size param is blank -- alt - alt text for image -- title - title text for image -- border - set to yes if border -- center - set to yes, if the image has to be centered -- upright - upright image param -- suppressplaceholder - if yes then checks to see if image is a placeholder and suppresses it -- link - page to visit when clicking on image -- Outputs: -- Formatted image. -- More details available at the "Module:InfoboxImage/doc" page local i = {}; local placeholder_image = { "Blue - Replace this image female.svg", "Blue - Replace this image male.svg", "Female no free image yet.png", "Flag of None (square).svg", "Flag of None.svg", "Flag of.svg", "Green - Replace this image female.svg", "Green - Replace this image male.svg", "Image is needed female.svg", "Image is needed male.svg", "Location map of None.svg", "Male no free image yet.png", "Missing flag.png", "No flag.svg", "No free portrait.svg", "No portrait (female).svg", "No portrait (male).svg", "Red - Replace this image female.svg", "Red - Replace this image male.svg", "Replace this image female (blue).svg", "Replace this image female.svg", "Replace this image male (blue).svg", "Replace this image male.svg", "Silver - Replace this image female.svg", "Silver - Replace this image male.svg", "Replace this image.svg", "Cricket no pic.png", "CarersLogo.gif", "Diagram Needed.svg", "Example.jpg", "Image placeholder.png", "No male portrait.svg", "Nocover-upload.png", "NoDVDcover copy.png", "Noribbon.svg", "No portrait-BFD-test.svg", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Sin bandera.svg", "Sin escudo.svg", "Replace this image - temple.png", "Replace this image butterfly.png", "Replace this image.svg", "Replace this image1.svg", "Resolution angle.png", "Image-No portrait-text-BFD-test.svg", "Insert image here.svg", "No image available.png", "NO IMAGE YET square.png", "NO IMAGE YET.png", "No Photo Available.svg", "No Screenshot.svg", "No-image-available.jpg", "Null.png", "PictureNeeded.gif", "Place holder.jpg", "Unbenannt.JPG", "UploadACopyrightFreeImage.svg", "UploadAnImage.gif", "UploadAnImage.svg", "UploadAnImageShort.svg", "CarersLogo.gif", "Diagram Needed.svg", "No male portrait.svg", "NoDVDcover copy.png", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Noimage.gif", } function i.IsPlaceholder(image) -- change underscores to spaces image = mw.ustring.gsub(image, "_", " "); assert(image ~= nil, 'mw.ustring.gsub(image, "_", " ") must not return nil') -- if image starts with [[ then remove that and anything after | if mw.ustring.sub(image,1,2) == "[[" then image = mw.ustring.sub(image,3); image = mw.ustring.gsub(image, "([^|]*)|.*", "%1"); assert(image ~= nil, 'mw.ustring.gsub(image, "([^|]*)|.*", "%1") must not return nil') end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); assert(image ~= nil, "mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1') must not return nil") -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); -- capitalise first letter image = mw.ustring.upper(mw.ustring.sub(image,1,1)) .. mw.ustring.sub(image,2); for i,j in pairs(placeholder_image) do if image == j then return true end end return false end function i.InfoboxImage(frame) local image = frame.args["image"]; if image == "" or image == nil then return ""; end if image == "&nbsp;" then return image; end if frame.args["suppressplaceholder"] ~= "no" then if i.IsPlaceholder(image) == true then return ""; end end if mw.ustring.lower(mw.ustring.sub(image,1,5)) == "http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "[http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[[http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "https:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[https:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,8)) == "[[https:" then return ""; end if mw.ustring.sub(image,1,2) == "[[" then -- search for thumbnail images and add to tracking cat if found local cat = ""; if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, "|%s*thumb%s*[|%]]") or mw.ustring.find(image, "|%s*thumbnail%s*[|%]]")) then cat = "[[Category:Pages using infoboxes with thumbnail images]]"; elseif mw.title.getCurrentTitle().namespace == 0 then cat = "[[Category:Pages using deprecated image syntax]]"; end return image .. cat; elseif mw.ustring.sub(image,1,2) == "{{" and mw.ustring.sub(image,1,3) ~= "{{{" then return image; elseif mw.ustring.sub(image,1,1) == "<" then return image; elseif mw.ustring.sub(image,1,5) == mw.ustring.char(127).."UNIQ" then -- Found strip marker at begining, so pass don't process at all return image; elseif mw.ustring.sub(image,4,9) == "`UNIQ-" then -- Found strip marker at begining, so pass don't process at all return image; else local result = ""; local page = frame.args["page"]; local size = frame.args["size"]; local maxsize = frame.args["maxsize"]; local sizedefault = frame.args["sizedefault"]; local alt = frame.args["alt"]; local link = frame.args["link"]; local title = frame.args["title"]; local border = frame.args["border"]; local upright = frame.args["upright"] or ""; local thumbtime = frame.args["thumbtime"] or ""; local center= frame.args["center"]; -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end if maxsize ~= "" and maxsize ~= nil then -- if no sizedefault then set to maxsize if sizedefault == "" or sizedefault == nil then sizedefault = maxsize end -- check to see if size bigger than maxsize if size ~= "" and size ~= nil then local sizenumber = tonumber(mw.ustring.match(size,"%d*")) or 0; local maxsizenumber = tonumber(mw.ustring.match(maxsize,"%d*")) or 0; if sizenumber>maxsizenumber and maxsizenumber>0 then size = maxsize; end end end -- add px to size if just a number if (tonumber(size) or 0) > 0 then size = size .. "px"; end -- add px to sizedefault if just a number if (tonumber(sizedefault) or 0) > 0 then sizedefault = sizedefault .. "px"; end result = "[[File:" .. image; if page ~= "" and page ~= nil then result = result .. "|page=" .. page; end if size ~= "" and size ~= nil then result = result .. "|" .. size; elseif sizedefault ~= "" and sizedefault ~= nil then result = result .. "|" .. sizedefault; else result = result .. "|frameless"; end if center == "yes" then result = result .. "|center" end if alt ~= "" and alt ~= nil then result = result .. "|alt=" .. alt; end if link ~= "" and link ~= nil then result = result .. "|link=" .. link; end if border == "yes" then result = result .. "|border"; end if upright == "yes" then result = result .. "|upright"; elseif upright ~= "" then result = result .. "|upright=" .. upright; end if thumbtime ~= "" then result = result .. "|thumbtime=" .. thumbtime; end if title ~= "" and title ~= nil then result = result .. "|" .. title; elseif alt ~= "" and alt ~= nil then result = result .. "|" .. alt; end result = result .. "]]"; return result; end end return i; fe1b9d0ae2fb38c931cf427430209e3a5e362ae1 Template:Template parameter usage 10 35 65 2021-08-21T18:02:56Z en>SUM1 0 Added missing "lc" parameters; added optional "based" parameter to add text "based on this[/its] TemplateData" at end of template wikitext text/x-wiki {{#switch:{{{label|}}} |=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|C|c}}lick here] to see a monthly parameter usage report for {{#if:{{{1|}}}|[[Template:{{ROOTPAGENAME:{{{1|}}}}}]]|this template}}{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}}. |None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|P|p}}arameter usage report]{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}} |for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|P|p}}arameter usage report] for {{#if:{{{1|}}}|[[Template:{{ROOTPAGENAME:{{{1|}}}}}]]|[[Template:{{ROOTPAGENAME}}]]}}{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}}. |#default=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{{label|}}}]{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}} }}<noinclude> {{documentation}} </noinclude> b9cdd1b2e409313904f041c38562a3d6221cc017 Template:TemplateData header 10 32 59 2021-08-29T21:32:29Z en>SUM1 0 Added "based" parameter to other transclusion wikitext text/x-wiki <div class="templatedata-header">{{#if:{{{noheader|}}}|<!-- noheader: -->{{Template parameter usage|based=y}}|<!-- +header: -->This is the {{#if:{{{nolink|}}}|<!-- +header, nolink TD -->TemplateData|<!-- +header, +link [[TD]]; DEFAULT: -->[[Wikipedia:TemplateData|TemplateData]]}}<!-- e.o. #if:nolink; DEFAULT: --> for this template used by [[mw:Extension:TemplateWizard|TemplateWizard]], [[Wikipedia:VisualEditor|VisualEditor]] and other tools. {{Template parameter usage|based=y}}<!-- e.o. #if:noheader -->}} '''TemplateData for {{{1|{{BASEPAGENAME}}}}}''' </div><includeonly><!-- check parameters -->{{#invoke:Check for unknown parameters|check |unknown={{template other|1=[[Category:Pages using TemplateData header with unknown parameters|_VALUE_]]}} |template=Template:TemplateData header |1 |nolink |noheader |preview=<div class="error" style="font-weight:normal">Unknown parameter '_VALUE_' in [[Template:TemplateData header]].</div> }}<!-- -->{{template other|{{sandbox other|| [[Category:Templates using TemplateData]] }}}}</includeonly><!-- --><noinclude>{{Documentation}}</noinclude> ddfbb4ae793846b96d4c06330417fa6ed4da2adc Template:Country data Brazil 10 134 330 2021-09-09T11:05:46Z wikipedia>Primefac 0 add military (TPER) wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Brazil | flag alias-1692 = Flag of the Princes of Brazil.svg | flag alias-1816 = Flag of the United Kingdom of Portugal, Brazil, and the Algarves.svg | flag alias-1822 = Flag of Brazil (1822–1870).svg | flag alias-1870 = Flag of Brazil (1870–1889).svg | flag alias = Flag of Brazil.svg | flag alias-1889 = Flag of Brazil (1889–1960).svg | flag alias-1960 = Flag of Brazil (1960–1968).svg | flag alias-1968 = Flag of Brazil (1968–1992).svg | flag alias-army = Flag of the Brazilian Army.png | link alias-army = Brazilian Army | flag alias-air force = Brazilian Air Force fin flash.svg | link alias-air force = Brazilian Air Force | link alias-naval = Brazilian Navy | flag alias-marines=Flag of the Brazilian Marine Corps.svg | link alias-marines=Brazilian Marine Corps | link alias-military = Brazilian Armed Forces | link alias-navy = Brazilian Navy | flag alias-navy = Flag of the Brazilian Navy.svg | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1692 | var2 = 1816 | var3 = 1822 | var4 = 1870 | var5 = 1889 | var6 = 1960 | var7 = 1968 | redir1 = BRA | redir2 = Federative Republic of Brazil | related1 = Empire of Brazil | related2 = Brazilian military government | related3 = First Brazilian Republic | related4 = Second Brazilian Republic | related5 = Vargas Era </noinclude> }} efef2331121dff90ef20e45117c2867e0ac93dcd Template:Used in system 10 123 304 2021-09-28T03:41:32Z en>MusikBot II 0 Protected "[[Template:Used in system]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 428 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require autoconfirmed or confirmed access] (indefinite)) wikitext text/x-wiki {{#invoke:High-use|main|1=|2={{{2|}}}|system={{#if:{{{1|}}}|{{{1}}}|in system messages}}<noinclude>|nocat=true</noinclude>}}<noinclude> {{documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 0abe278369db6cbbe319e7452d7644e27e11c532 Module:Unsubst 828 126 310 2021-10-08T18:22:16Z en>Trappist the monk 0 sync from sandbox; see [[Module_talk:Unsubst#template_invocation_name_override|talk]]; Scribunto text/plain local checkType = require('libraryUtil').checkType local p = {} local BODY_PARAM = '$B' local specialParams = { ['$params'] = 'parameter list', ['$aliases'] = 'parameter aliases', ['$flags'] = 'flags', ['$B'] = 'template content', ['$template-name'] = 'template invocation name override', } function p.main(frame, body) -- If we are substing, this function returns a template invocation, and if -- not, it returns the template body. The template body can be specified in -- the body parameter, or in the template parameter defined in the -- BODY_PARAM variable. This function can be called from Lua or from -- #invoke. -- Return the template body if we aren't substing. if not mw.isSubsting() then if body ~= nil then return body elseif frame.args[BODY_PARAM] ~= nil then return frame.args[BODY_PARAM] else error(string.format( "no template content specified (use parameter '%s' from #invoke)", BODY_PARAM ), 2) end end -- Sanity check for the frame object. if type(frame) ~= 'table' or type(frame.getParent) ~= 'function' or not frame:getParent() then error( "argument #1 to 'main' must be a frame object with a parent " .. "frame available", 2 ) end -- Find the invocation name. local mTemplateInvocation = require('Module:Template invocation') local name if frame.args['$template-name'] and '' ~= frame.args['$template-name'] then name = frame.args['$template-name'] -- override whatever the template name is with this name else name = mTemplateInvocation.name(frame:getParent():getTitle()) end -- Combine passed args with passed defaults local args = {} if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*override%s*,' ) then for k, v in pairs( frame:getParent().args ) do args[k] = v end for k, v in pairs( frame.args ) do if not specialParams[k] then if v == '__DATE__' then v = mw.getContentLanguage():formatDate( 'F Y' ) end args[k] = v end end else for k, v in pairs( frame.args ) do if not specialParams[k] then if v == '__DATE__' then v = mw.getContentLanguage():formatDate( 'F Y' ) end args[k] = v end end for k, v in pairs( frame:getParent().args ) do args[k] = v end end -- Trim parameters, if not specified otherwise if not string.find( ','..(frame.args['$flags'] or '')..',', ',%s*keep%-whitespace%s*,' ) then for k, v in pairs( args ) do args[k] = mw.ustring.match(v, '^%s*(.*)%s*$') or '' end end -- Pull information from parameter aliases local aliases = {} if frame.args['$aliases'] then local list = mw.text.split( frame.args['$aliases'], '%s*,%s*' ) for k, v in ipairs( list ) do local tmp = mw.text.split( v, '%s*>%s*' ) aliases[tonumber(mw.ustring.match(tmp[1], '^[1-9][0-9]*$')) or tmp[1]] = ((tonumber(mw.ustring.match(tmp[2], '^[1-9][0-9]*$'))) or tmp[2]) end end for k, v in pairs( aliases ) do if args[k] and ( not args[v] or args[v] == '' ) then args[v] = args[k] end args[k] = nil end -- Remove empty parameters, if specified if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*remove%-empty%s*,' ) then local tmp = 0 for k, v in ipairs( args ) do if v ~= '' or ( args[k+1] and args[k+1] ~= '' ) or ( args[k+2] and args[k+2] ~= '' ) then tmp = k else break end end for k, v in pairs( args ) do if v == '' then if not (type(k) == 'number' and k < tmp) then args[k] = nil end end end end -- Order parameters if frame.args['$params'] then local params, tmp = mw.text.split( frame.args['$params'], '%s*,%s*' ), {} for k, v in ipairs(params) do v = tonumber(mw.ustring.match(v, '^[1-9][0-9]*$')) or v if args[v] then tmp[v], args[v] = args[v], nil end end for k, v in pairs(args) do tmp[k], args[k] = args[k], nil end args = tmp end return mTemplateInvocation.invocation(name, args) end p[''] = p.main -- For backwards compatibility return p 7f01ffc8aa2ac4a4772f14c12e0b77e384ecabb6 Module:Documentation/config 828 44 149 2021-10-16T13:23:15Z en>Startus 0 Fix links Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[Image:Sandbox.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[wikipedia:Wikipedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[wikipedia:Wikipedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] -- A category to add to all template sandboxes. cfg['sandbox-category'] = 'Template sandboxes' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[wikipedia:Wikipedia:Template documentation|documentation]] is [[wikipedia:Wikipedia:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Please add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['file-docpage-preload'] -- Preload file for documentation page in the file namespace. cfg['file-docpage-preload'] = 'Template:Documentation/preload-filespace' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- Print version configuration ---------------------------------------------------------------------------------------------------- -- cfg['print-subpage'] -- The name of the template subpage used for print versions. cfg['print-subpage'] = 'Print' -- cfg['print-link-display'] -- The text to display when linking to the /Print subpage. cfg['print-link-display'] = '/Print' -- cfg['print-blurb'] -- Text to display if a /Print subpage exists. $1 is a link to the subpage with a display value of cfg['print-link-display']. cfg['print-blurb'] = 'A [[Help:Books/for experts#Improving the book layout|print version]] of this template exists at $1.' .. ' If you make a change to this template, please update the print version as well.' -- cfg['display-print-category'] -- Set to true to enable output of cfg['print-category'] if a /Print subpage exists. -- This should be a boolean value (either true or false). cfg['display-print-category'] = true -- cfg['print-category'] -- Category to output if cfg['display-print-category'] is set to true, and a /Print subpage exists. cfg['print-category'] = 'Templates with print versions' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['main-div-id'] -- The "id" attribute of the main HTML "div" tag. cfg['main-div-id'] = 'template-documentation' -- cfg['main-div-classes'] -- The CSS classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'template-documentation iezoomfix' -- cfg['start-box-linkclasses'] -- The CSS classes used for the [view][edit][history] or [create] links in the start box. cfg['start-box-linkclasses'] = 'mw-editsection-like plainlinks' -- cfg['start-box-link-id'] -- The HTML "id" attribute for the links in the start box. cfg['start-box-link-id'] = 'doc_editlinks' ---------------------------------------------------------------------------------------------------- -- {{fmbox}} template configuration ---------------------------------------------------------------------------------------------------- -- cfg['fmbox-id'] -- The id sent to the "id" parameter of the {{fmbox}} template. cfg['fmbox-id'] = 'documentation-meta-data' -- cfg['fmbox-style'] -- The value sent to the style parameter of {{fmbox}}. cfg['fmbox-style'] = 'background-color: #ecfcf4' -- cfg['fmbox-textstyle'] -- The value sent to the "textstyle parameter of {{fmbox}}. cfg['fmbox-textstyle'] = 'font-style: italic' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg e5eebf115ac15bbe50e343eb8dbce26521894c42 83 2022-01-25T23:46:11Z en>Ianblair23 0 link Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[File:Sandbox.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] -- A category to add to all template sandboxes. cfg['sandbox-category'] = 'Template sandboxes' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 71b68ed73088f1a59d61acf06bbee9fde6677f03 Template:Module other 10 107 272 2021-10-20T19:50:22Z en>MusikBot II 0 Changed protection settings for "[[Template:Module other]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 3570 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite)) wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Module}} | module | other }} }} | module = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 503694836c1b07142e63fd35d8be69ec8bb9ffe7 Template:High-use 10 106 270 2021-10-22T01:54:41Z en>MusikBot II 0 Changed protection settings for "[[Template:High-use]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 3343 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite)) wikitext text/x-wiki {{#invoke:High-use|main|1={{{1|}}}|2={{{2|}}}|all-pages={{{all-pages|}}}|info={{{info|}}}|demo={{{demo|}}}|form={{{form|}}}|expiry={{{expiry|}}}|system={{{system|}}}}}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage; interwiki links go to Wikidata, thank you! --> </noinclude> dc5ea36aa88cf409e3280bf65dbfc2566faffe29 Template:Cite Legislation AU 10 197 548 2021-10-25T03:59:32Z en>Taweetham 0 https wikitext text/x-wiki {{ #switch: {{{2}}} | act = {{#ifeq: {{{5|0}}} | 0 | ''[https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/consol_act/{{{3}}}/ {{{4}}}]'' ({{{1}}}) | ''{{{4}}}'' ({{{1}}}) [https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/consol_act/{{{3}}}/s{{lc:{{{5}}}}}.html s&nbsp;{{{5}}}] }} | num_act = {{#ifeq: {{{5|0}}} | 0 | ''[https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/num_act/{{{3}}}/ {{{4}}}]'' ({{{1}}}) | ''{{{4}}}'' ({{{1}}}) [https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/num_act/{{{3}}}/s{{lc:{{{5}}}}}.html s&nbsp;{{{5}}}] }} | hist_act = {{#ifeq: {{{5|0}}} | 0 | ''[https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/hist_act/{{{3}}}.pdf {{{4}}}]'' ({{{1}}}) | ''{{{4}}}'' ({{{1}}}) [https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/hist_act/{{{3}}}.pdf s&nbsp;{{{5}}}] }} | reg = {{#ifeq: {{{5|0}}} | 0 | ''[https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/consol_reg/{{{3}}}/ {{{4}}}]'' ({{{1}}}) | ''{{{4}}}'' ({{{1}}}) [https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/consol_reg/{{{3}}}/s{{lc:{{{5}}}}}.html r&nbsp;{{{5}}}] }} | num_reg = {{#ifeq: {{{5|0}}} | 0 | ''[https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/num_reg/{{{3}}}/ {{{4}}}]'' ({{{1}}}) | ''{{{4}}}'' ({{{1}}}) [https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/num_reg/{{{3}}}/s{{lc:{{{5}}}}}.html r&nbsp;{{{5}}}] }} | bill = [https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/bill/{{{3}}} {{{4}}}] ({{{1}}}) | memo = [https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/bill_em/{{{3}}}/memo_{{{5|0}}}.html Explanatory Memorandum, {{{4}}}] ({{{1}}}) {{{5|}}} | repealed_act = {{#ifeq: {{{5|0}}} | 0 | ''[https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/repealed_act/{{{3}}}/ {{{4}}}]'' ({{{1}}}) | ''{{{4}}}'' ({{{1}}}) [https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/repealed_act/{{{3}}}/s{{lc:{{{5}}}}}.html s&nbsp;{{{5}}}] }} | repealed_reg = {{#ifeq: {{{5|0}}} | 0 | ''[https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/repealed_reg/{{{3}}}/ {{{4}}}]'' ({{{1}}}) | ''{{{4}}}'' ({{{1}}}) [https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/repealed_reg/{{{3}}}/s{{lc:{{{5}}}}}.html r&nbsp;{{{5}}}] }} }}<noinclude> {{documentation}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> <templatedata> { "params": { "1": { "label": "Jurisdiction", "description": "In all cases jurisdiction will be one of Cth (for federal legislation) or ACT, NSW, NT, Qld, SA, Tas, Vic or WA (for state and territory legislation).", "type": "string", "required": true }, "2": { "label": "Legislation type", "description": "One of act, num_act, hist_act, reg, num_reg, bill, memo, repealed_act, repealed_reg", "type": "string", "required": true }, "3": { "label": "Short Name", "description": "Appears in the AustLII URL", "example": "ca1968133", "required": true }, "4": { "label": "Title", "description": "For the citation", "example": "Copyright Act 1968", "required": true }, "5": { "label": "Pinpoint reference", "example": "41a" } }, "description": "This template produces links to a variety of different legislation resources located on the [[AustLII]] site. Formatting is designed to be in compliance with the [[Australian Guide to Legal Citation]].", "paramOrder": [ "1", "2", "3", "4", "5" ] } </templatedata></noinclude> b4da41f608b306c650b0314d6e46c047eb38c2c7 Module:Navbar 828 75 254 2021-11-13T05:33:43Z en>Izno 0 remove unnecessary line Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '' -- TODO: Get link_descriptions and show into the configuration module. -- link_descriptions should be easier... local link_descriptions = { { ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template', ['link'] = title.fullText, ['url'] = false }, { ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template', ['link'] = talkpage, ['url'] = false }, { ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template', ['link'] = title:fullUrl('action=edit'), ['url'] = true }, { ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template', ['link'] = title:fullUrl('action=history'), ['url'] = true }, { ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template', ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, { ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template', ['link'] = title:fullUrl('action=watch'), ['url'] = true } } local ul = mw.html.create('ul') if has_brackets then ul:addClass(cfg.classes.brackets) :cssText(font_style) end for i, _ in ipairs(displayed_links) do if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end end return ul:done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p a5c8d3a8f8beb18984ea7f145ddbdf88a065d23e 185 2022-02-08T19:58:09Z en>Courelli 0 Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p ab8d0f06762f63ada7b225c4e1ab2a7037562880 Module:Infobox 828 50 95 2021-11-16T10:29:48Z en>Fayenatic london 0 spacing Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub( category_in_empty_row_pattern, '' ):match('^%S') then has_rows = true local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true root :tag('tr') :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true local row = root:tag('tr') row:addClass(imageArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(mw.getCurrentFrame():expandTemplate({title = 'italic title'})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if args.decat == 'yes' then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ base_templatestyles, -- see function description templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p 05a758c4532f643205b2300a5935f5d4ef3fc721 183 95 2022-01-11T22:19:14Z en>Courelli 0 Scribunto text/plain -- -- This module implements {{Infobox}} -- local p = {} local navbar = require('Module:Navbar')._navbar local args = {} local origArgs local root local function notempty( s ) return s and s:match( '%S' ) end local function fixChildBoxes(sval, tt) if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_musical_artist&oldid=849054481 -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end local function union(t1, t2) -- Returns the union of the values of two tables, as a sequence. local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end local function getArgNums(prefix) -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end local function addRow(rowArgs) -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. if rowArgs.header then root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :attr('id', rowArgs.rowid) :tag('th') :attr('colspan', 2) :attr('id', rowArgs.headerid) :addClass(rowArgs.class) :addClass(args.headerclass) :css('text-align', 'center') :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) elseif rowArgs.data then local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) row:attr('id', rowArgs.rowid) if rowArgs.label then row :tag('th') :attr('scope', 'row') :attr('id', rowArgs.labelid) :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') if not rowArgs.label then dataCell :attr('colspan', 2) :css('text-align', 'center') end dataCell :attr('id', rowArgs.dataid) :addClass(rowArgs.class) :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) end end local function renderTitle() if not args.title then return end root :tag('caption') :addClass(args.titleclass) :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end root :tag('tr') :tag('th') :attr('colspan', 2) :addClass(args.aboveclass) :css('text-align', 'center') :css('font-size', '125%') :css('font-weight', 'bold') :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end root :tag('tr') :tag('td') :attr('colspan', '2') :addClass(args.belowclass) :css('text-align', 'center') :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addRow({ data = args['subheader' .. tostring(num)], datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :cssText(args.captionstyle) :wikitext(caption) end addRow({ data = tostring(data), datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end local function renderRows() -- Gets the union of the header and data argument numbers, -- and renders them all in order using addRow. local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)], dataid = args['dataid' .. tostring(num)], labelid = args['labelid' .. tostring(num)], headerid = args['headerid' .. tostring(num)], rowid = args['rowid' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end root :tag('tr') :tag('td') :attr('colspan', '2') :css('text-align', 'right') :wikitext(navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(mw.getCurrentFrame():expandTemplate({title = 'italic title'})) end end local function renderTrackingCategories() if args.decat ~= 'yes' then if args.child == 'yes' then if args.title then root:wikitext('[[Category:Pages which use embedded infobox templates with the title parameter]]') end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles which use infobox templates with no data rows]]') end end end local function _infobox() -- Specify the overall layout of the infobox, with special settings -- if the infobox is used as a 'child' inside another infobox. if args.child ~= 'yes' then root = mw.html.create('table') root :addClass((args.subbox ~= 'yes') and 'infobox' or nil) :addClass(args.bodyclass) if args.subbox == 'yes' then root :css('padding', '0') :css('border', 'none') :css('margin', '-3px') :css('width', 'auto') :css('min-width', '100%') :css('font-size', '100%') :css('clear', 'none') :css('float', 'none') :css('background-color', 'transparent') else root :css('width', '22em') end root :cssText(args.bodystyle) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end renderSubheaders() renderImages() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderTrackingCategories() return tostring(root) end local function preprocessSingleArg(argName) -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end local function preprocessArgs(prefixTable, step) -- Assign the parameters with the given prefixes to the args table, in order, in batches -- of the step size specified. This is to prevent references etc. from appearing in the -- wrong order. The prefixTable should be an array containing tables, each of which has -- two possible fields, a "prefix" string and a "depend" table. The function always parses -- parameters containing the "prefix" string, but only parses parameters in the "depend" -- table if the prefix parameter is present and non-blank. if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones. preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present and not blank, or -- we are processing "prefix1" and "prefix" is present and not blank, and -- if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end function p.infobox(frame) -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end -- Parse the data parameters in the same order that the old {{infobox}} did, so that -- references etc. will display in the expected places. Parameters that depend on -- another parameter are only processed if that parameter is present, to avoid -- phantom references appearing in article reference lists. preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'}, {prefix = 'dataid'}, {prefix = 'labelid'}, {prefix = 'headerid'}, {prefix = 'rowid'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') args['italic title'] = origArgs['italic title'] -- different behaviour if blank or absent preprocessSingleArg('decat') return _infobox() end return p 86cf80d64495ad16eb12aa533ca749c55689b02d Template:Center 10 6 7 2021-11-17T16:12:42Z en>Xaosflux 0 Changed protection settings for "[[Template:Center]]": [[WP:High-risk templates|Highly visible template]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki <includeonly><div class="center" style="width:auto; margin-left:auto; margin-right:auto;{{#if: {{{style|}}} | {{{style}}};}}">{{{1|[[Category:Pages using center with no arguments]]}}}</div></includeonly><noinclude> {{documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 1bcdac1c025611248a10a1f17cdfdedcc3b1d6c1 Template:Main other 10 21 37 2021-12-10T16:08:06Z en>Xaosflux 0 <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:0}} | main | other }} }} | main = {{{1|}}} | other | #default = {{{2|}}} }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 86ad907ffeea3cc545159e00cd1f2d6433946450 Module:Lua banner 828 54 103 2021-12-10T22:30:39Z en>Fayenatic london 0 Update categories, see [[Wikipedia:Categories for discussion/Log/2021 October 31]] Scribunto text/plain -- This module implements the {{lua}} template. local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local p = {} function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end function p._main(args) local modules = mTableTools.compressSparseArray(args) local box = p.renderBox(modules) local trackingCategories = p.renderTrackingCategories(args, modules) return box .. trackingCategories end function p.renderBox(modules) local boxArgs = {} if #modules < 1 then boxArgs.text = '<strong class="error">Error: no modules specified</strong>' else local moduleLinks = {} for i, module in ipairs(modules) do moduleLinks[i] = string.format('[[:%s]]', module) local maybeSandbox = mw.title.new(module .. '/sandbox') if maybeSandbox.exists then moduleLinks[i] = moduleLinks[i] .. string.format(' ([[:%s|sandbox]])', maybeSandbox.fullText) end end local moduleList = mList.makeList('bulleted', moduleLinks) local title = mw.title.getCurrentTitle() if title.subpageText == "doc" then title = title.basePageTitle end if title.contentModel == "Scribunto" then boxArgs.text = 'This module depends on the following other modules:' .. moduleList else boxArgs.text = 'This template uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList end end boxArgs.type = 'notice' boxArgs.small = true boxArgs.image = '[[File:Lua-Logo.svg|30px|alt=|link=]]' return mMessageBox.main('mbox', boxArgs) end function p.renderTrackingCategories(args, modules, titleObj) if yesno(args.nocat) then return '' end local cats = {} -- Error category if #modules < 1 then cats[#cats + 1] = 'Lua templates with errors' end -- Lua templates category titleObj = titleObj or mw.title.getCurrentTitle() local subpageBlacklist = { doc = true, sandbox = true, sandbox2 = true, testcases = true } if not subpageBlacklist[titleObj.subpageText] then local protCatName if titleObj.namespace == 10 then local category = args.category if not category then local categories = { ['Module:String'] = 'Templates based on the String Lua module', ['Module:Math'] = 'Templates based on the Math Lua module', ['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module', ['Module:Citation'] = 'Templates based on the Citation/CS1 Lua module' } categories['Module:Citation/CS1'] = categories['Module:Citation'] category = modules[1] and categories[modules[1]] category = category or 'Lua-based templates' end cats[#cats + 1] = category protCatName = "Templates using under-protected Lua modules" elseif titleObj.namespace == 828 then protCatName = "Modules depending on under-protected modules" end if not args.noprotcat and protCatName then local protLevels = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } local currentProt if titleObj.id ~= 0 then -- id is 0 (page does not exist) if am previewing before creating a template. currentProt = titleObj.protectionLevels["edit"][1] end if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end for i, module in ipairs(modules) do if module ~= "WP:libraryUtil" then local moduleProt = mw.title.new(module).protectionLevels["edit"][1] if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end if moduleProt < currentProt then cats[#cats + 1] = protCatName break end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end return p 6e3bedcc849ff22d4f702708965c39b97d7e8585 Module:Navbox/styles.css 828 103 264 2021-12-21T22:10:10Z en>Izno 0 remove qualifications on th - this will remove styling from "hand-crafted" navboxes, but there's no other elegant way to deal with it. see talk page text text/plain /* {{pp|small=y}} */ .navbox { box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; clear: both; font-size: 88%; text-align: center; padding: 1px; margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */ } .navbox .navbox { margin-top: 0; /* No top margin for nested navboxes */ } .navbox + .navbox, /* TODO: remove first line after transclusions have updated */ .navbox + .navbox-styles + .navbox { margin-top: -1px; /* Single pixel border between adjacent navboxes */ } .navbox-inner, .navbox-subgroup { width: 100%; } .navbox-group, .navbox-title, .navbox-abovebelow { padding: 0.25em 1em; line-height: 1.5em; text-align: center; } .navbox-group { white-space: nowrap; /* @noflip */ text-align: right; } .navbox, .navbox-subgroup { background-color: #fdfdfd; } .navbox-list { line-height: 1.5em; border-color: #fdfdfd; /* Must match background color */ } .navbox-list-with-group { text-align: left; border-left-width: 2px; border-left-style: solid; } /* cell spacing for navbox cells */ /* Borders above 2nd, 3rd, etc. rows */ /* TODO: figure out how to replace tr as structure; * with div structure it should be just a matter of first-child */ tr + tr > .navbox-abovebelow, tr + tr > .navbox-group, tr + tr > .navbox-image, tr + tr > .navbox-list { border-top: 2px solid #fdfdfd; /* Must match background color */ } .navbox-title { background-color: #ccf; /* Level 1 color */ } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background-color: #ddf; /* Level 2 color */ } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background-color: #e6e6ff; /* Level 3 color */ } .navbox-even { background-color: #f7f7f7; } .navbox-odd { background-color: transparent; } /* TODO: figure out how to remove reliance on td as structure */ .navbox .hlist td dl, .navbox .hlist td ol, .navbox .hlist td ul, .navbox td.hlist dl, .navbox td.hlist ol, .navbox td.hlist ul { padding: 0.125em 0; } .navbox .navbar { display: block; font-size: 100%; } .navbox-title .navbar { /* @noflip */ float: left; /* @noflip */ text-align: left; /* @noflip */ margin-right: 0.5em; } e80b0d7a5770e6e105dab832deb6c37a5245ebc6 Template:Organization infoboxes 10 87 226 2021-12-22T00:53:12Z en>Funandtrvl 0 update links wikitext text/x-wiki {{Navbox | name = Organization infoboxes | state = {{{state<includeonly>|expanded</includeonly>}}} | bodyclass = hlist | title = [[Wikipedia:Template index|Wikipedia templates]]: [[organization]] [[Template:Infobox|infoboxes]] | above = [[Wikipedia:Manual of Style/Infoboxes]] | group1 = General | list1 = * {{Tl|Infobox organization}} * {{Tl|Infobox official post}} * {{tl|Infobox criminal organization}} * {{tl|Infobox fictional organisation}} | group2 = {{longitem|Government<br/>and politics}} | list2 = * {{Tl|Infobox government}} * {{Tl|Infobox government agency}} * {{Tl|Infobox legislature}} * {{Tl|Infobox political party}} * {{Tl|Infobox court}} * {{Tl|Infobox detention facility}} * {{tl|Infobox fire department}} * {{Tl|Infobox law enforcement agency}} * {{Tl|Infobox space agency}} | group3 = Military | list3 = * {{Tl|Infobox national military}} * {{Tl|Infobox military unit}} * {{tl|Infobox military rank}} * {{Tl|Infobox military gear}} | group4 = Religion | list4 = * {{Tl|Infobox religious group}} * {{Tl|Infobox Christian denomination}} * {{Tl|Infobox diocese}} * {{Tl|Infobox church}} * {{Tl|Infobox monastery}} | group5 = People | list5 = * {{Tl|Infobox ethnic group}} * {{Tl|Infobox caste}} * {{Tl|Infobox clan}} * {{Tl|Infobox family}} * {{Tl|Infobox hereditary title}} * {{Tl|Infobox monarchy}} * {{Tl|Infobox officeholder}} * {{Tl|Infobox tribe}} | group6 = {{longitem|Typically<br/>non-profit}} | list6 = * {{tl|Infobox hospital}} * {{Tl|Infobox institute}} * {{Tl|Infobox laboratory}}{{smallsup|1}} * {{tl|Infobox museum}} * {{Tl|Infobox observatory}} * {{Tl|Infobox school}} * {{tl|Infobox school district}} * {{Tl|Infobox university}}{{smallsup|2}} | group7 = Publications | list7 = * {{Tl|Infobox journal}} * {{Tl|Infobox magazine}} * {{Tl|Infobox newspaper}} * {{Tl|Infobox publisher}} | group8 = Business | list8 = * {{Tl|Infobox company}} * {{tl|Infobox brewery}} * {{Tl|Infobox law firm}} * {{tl|Infobox restaurant}} * {{tl|Infobox website}} – ''type of business or publication'' | group9 = Distinctions | list9 = * {{Tl|Infobox order}} * {{Tl|Infobox fraternity}} * {{Tl|Infobox Grand Lodge}} | group10 = Subtemplates | list10 = * '''Coordinates'''&nbsp;{{Tl|coord}} * '''Dates''' ** {{Tl|start date}}}—for {{para|established}}, {{para|founded}}, {{para|opened}} etc. ** {{Tl|end date}}}—for {{para|dissolved}}, {{para|defunct}} * '''Lists''' **{{tl|plainlist}} ** {{tl|flatlist}} ** {{tl|unbulleted list}} * '''Non-English text'''&nbsp;{{Tl|lang}} * '''Website''' ** {{tl|URL}} ** {{tl|Official URL}} ** {{tl|Official website}} * '''Documentation''' ** &nbsp;{{Tl|mf-adr}}}—Address ** &nbsp;{{Tl|UF-hcard-org}}—[[Microformat]]/metadata | below = * {{smallsup|1}} or research institution * {{smallsup|2}} or college * [[:Category:Infobox templates|Category]] * [[Help:Infobox|Help]] * [[Wikipedia:List of infoboxes|List of infoboxes]] }}<noinclude>{{documentation}}</noinclude> 8686e107237649b39aaa1a793a50b8fdddb17421 Module:Transclusion count 828 114 286 2021-12-22T22:48:57Z en>GKFX 0 Correction to tabulate function Scribunto text/plain local p = {} function p.fetch(frame) local template = nil local return_value = nil -- Use demo parameter if it exists, otherswise use current template name local namespace = mw.title.getCurrentTitle().namespace if frame.args["demo"] and frame.args["demo"] ~= "" then template = frame.args["demo"] elseif namespace == 10 then -- Template namespace template = mw.title.getCurrentTitle().text elseif namespace == 828 then -- Module namespace template = (mw.site.namespaces[828].name .. ":" .. mw.title.getCurrentTitle().text) end -- If in template or module namespace, look up count in /data if template ~= nil then namespace = mw.title.new(template, "Template").namespace if namespace == 10 or namespace == 828 then template = mw.ustring.gsub(template, "/doc$", "") -- strip /doc from end local index = mw.ustring.sub(mw.title.new(template).text,1,1) local status, data = pcall(function () return(mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other"))) end) if status then return_value = tonumber(data[mw.ustring.gsub(template, " ", "_")]) end end end -- If database value doesn't exist, use value passed to template if return_value == nil and frame.args[1] ~= nil then local arg1=mw.ustring.match(frame.args[1], '[%d,]+') if arg1 and arg1 ~= '' then return_value = tonumber(frame:callParserFunction('formatnum', arg1, 'R')) end end return return_value end -- Tabulate this data for [[Wikipedia:Database reports/Templates transcluded on the most pages]] function p.tabulate(frame) local list = {} for i = 65, 91 do local data = mw.loadData('Module:Transclusion count/data/' .. ((i == 91) and 'other' or string.char(i))) for name, count in pairs(data) do table.insert(list, {mw.title.new(name, "Template").fullText, count}) end end table.sort(list, function(a, b) return (a[2] == b[2]) and (a[1] < b[1]) or (a[2] > b[2]) end) local lang = mw.getContentLanguage(); for i = 1, #list do list[i] = ('|-\n| %d || [[%s]] || %s\n'):format(i, list[i][1]:gsub('_', ' '), lang:formatNum(list[i][2])) end return table.concat(list) end return p 9b2940dfd623cf550f748fd5bfc25b7f69cd14cd Template:Ifsubst 10 16 27 2022-01-02T08:48:20Z en>Dinoguy1000 0 fix "|=foo" bug wikitext text/x-wiki {{ safesubst:<noinclude/>#if:{{{demo|}}} |{{ safesubst:<noinclude/>#ifeq:{{{demo}}} |no |{{{no|{{{2|}}}}}} |{{{yes|{{{1|}}}}}} }} |{{ safesubst:<noinclude/>#ifeq:{{ safesubst:<noinclude/>NAMESPACE}}|{{NAMESPACE}} |{{{no|{{{2|}}}}}} |{{{yes|{{{1|}}}}}} }}}}<noinclude> {{Documentation}} </noinclude> 38e667b5df326086489bf557a5f7c4e43393af78 Template:FULLROOTPAGENAME 10 120 298 2022-01-02T08:54:02Z en>Dinoguy1000 0 fix "|=foo" bug wikitext text/x-wiki {{ safesubst:<noinclude/>#if: {{ safesubst:<noinclude/>Ns has subpages | {{ safesubst:<noinclude/>#if:{{{1|}}}|{{ safesubst:<noinclude/>NAMESPACE:{{{1}}}}}|{{ safesubst:<noinclude/>NAMESPACE}}}} }} | {{ safesubst:<noinclude/>#titleparts:{{ safesubst:<noinclude/>#if:{{{1|}}}|{{{1}}}|{{ safesubst:<noinclude/>FULLPAGENAME}}}}|1}} | {{ safesubst:<noinclude/>#if:{{{1|}}}|{{{1}}}|{{ safesubst:<noinclude/>FULLPAGENAME}}}} }}<noinclude> {{documentation}} </noinclude> fd0c4e7050dded2d50e5df405e6e5e31dd0d46ac Module:Navbar/styles.css 828 100 258 2022-01-03T23:12:15Z en>Izno 0 navbar styles that were moved to parent templates text text/plain /* {{pp|small=yes}} */ .navbar { display: inline; font-size: 88%; font-weight: normal; } .navbar-collapse { float: left; text-align: left; } .navbar-boxtext { word-spacing: 0; } .navbar ul { display: inline-block; white-space: nowrap; line-height: inherit; } .navbar-brackets::before { margin-right: -0.125em; content: '[ '; } .navbar-brackets::after { margin-left: -0.125em; content: ' ]'; } .navbar li { word-spacing: -0.125em; } .navbar a > span, .navbar a > abbr { text-decoration: inherit; } .navbar-mini abbr { font-variant: small-caps; border-bottom: none; text-decoration: none; cursor: inherit; } .navbar-ct-full { font-size: 114%; margin: 0 7em; } .navbar-ct-mini { font-size: 114%; margin: 0 4em; } 9d4056f949b4f0b159e3d40dfb1a5f01e72f9571 Module:Navbox 828 101 260 2022-01-07T21:39:23Z en>Izno 0 remove titlegroup per templatestyles section on talk page Scribunto text/plain local p = {} local navbar = require('Module:Navbar')._navbar local cfg = mw.loadData('Module:Navbox/configuration') local getArgs -- lazily initialized local args local format = string.format local function striped(wikitext, border) -- Return wikitext with markers replaced for odd/even striping. -- Child (subgroup) navboxes are flagged with a category that is removed -- by parent navboxes. The result is that the category shows all pages -- where a child navbox is not contained in a parent navbox. local orphanCat = cfg.category.orphan if border == cfg.keyword.border_subgroup and args[cfg.arg.orphan] ~= cfg.keyword.orphan_yes then -- No change; striping occurs in outermost navbox. return wikitext .. orphanCat end local first, second = cfg.class.navbox_odd_part, cfg.class.navbox_even_part if args[cfg.arg.evenodd] then if args[cfg.arg.evenodd] == cfg.keyword.evenodd_swap then first, second = second, first else first = args[cfg.arg.evenodd] second = first end end local changer if first == second then changer = first else local index = 0 changer = function (code) if code == '0' then -- Current occurrence is for a group before a nested table. -- Set it to first as a valid although pointless class. -- The next occurrence will be the first row after a title -- in a subgroup and will also be first. index = 0 return first end index = index + 1 return index % 2 == 1 and first or second end end local regex = orphanCat:gsub('([%[%]])', '%%%1') return (wikitext:gsub(regex, ''):gsub(cfg.marker.regex, changer)) -- () omits gsub count end local function processItem(item, nowrapitems) if item:sub(1, 2) == '{|' then -- Applying nowrap to lines in a table does not make sense. -- Add newlines to compensate for trim of x in |parm=x in a template. return '\n' .. item ..'\n' end if nowrapitems == cfg.keyword.nowrapitems_yes then local lines = {} for line in (item .. '\n'):gmatch('([^\n]*)\n') do local prefix, content = line:match('^([*:;#]+)%s*(.*)') if prefix and not content:match(cfg.pattern.nowrap) then line = format(cfg.nowrap_item, prefix, content) end table.insert(lines, line) end item = table.concat(lines, '\n') end if item:match('^[*:;#]') then return '\n' .. item ..'\n' end return item end -- we will want this later when we want to add tstyles for hlist/plainlist local function has_navbar() return args[cfg.arg.navbar] ~= cfg.keyword.navbar_off and args[cfg.arg.navbar] ~= cfg.keyword.navbar_plain and ( args[cfg.arg.name] or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.pattern.sandbox, '') ~= cfg.pattern.navbox ) end local function renderNavBar(titleCell) if has_navbar() then titleCell:wikitext(navbar{ [cfg.navbar.name] = args[cfg.arg.name], [cfg.navbar.mini] = 1, [cfg.navbar.fontstyle] = (args[cfg.arg.basestyle] or '') .. ';' .. (args[cfg.arg.titlestyle] or '') .. ';background:none transparent;border:none;box-shadow:none;padding:0;' }) end end local function renderTitleRow(tbl) if not args[cfg.arg.title] then return end local titleRow = tbl:tag('tr') local titleCell = titleRow:tag('th'):attr('scope', 'col') local titleColspan = 2 if args[cfg.arg.imageleft] then titleColspan = titleColspan + 1 end if args[cfg.arg.image] then titleColspan = titleColspan + 1 end titleCell :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.titlestyle]) :addClass(cfg.class.navbox_title) :attr('colspan', titleColspan) renderNavBar(titleCell) titleCell :tag('div') -- id for aria-labelledby attribute :attr('id', mw.uri.anchorEncode(args[cfg.arg.title])) :addClass(args[cfg.arg.titleclass]) :css('font-size', '114%') :css('margin', '0 4em') :wikitext(processItem(args[cfg.arg.title])) end local function getAboveBelowColspan() local ret = 2 if args[cfg.arg.imageleft] then ret = ret + 1 end if args[cfg.arg.image] then ret = ret + 1 end return ret end local function renderAboveRow(tbl) if not args[cfg.arg.above] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.aboveclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.abovestyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') -- id for aria-labelledby attribute, if no title :attr('id', args[cfg.arg.title] and nil or mw.uri.anchorEncode(args[cfg.arg.above])) :wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems])) end local function renderBelowRow(tbl) if not args[cfg.arg.below] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.belowclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.belowstyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') :wikitext(processItem(args[cfg.arg.below], args[cfg.arg.nowrapitems])) end local function renderListRow(tbl, index, listnum, listnums_size) local row = tbl:tag('tr') if index == 1 and args[cfg.arg.imageleft] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 2px 0 0') :cssText(args[cfg.arg.imageleftstyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.imageleft])) end local group_and_num = format(cfg.arg.group_and_num, listnum) local groupstyle_and_num = format(cfg.arg.groupstyle_and_num, listnum) if args[group_and_num] then local groupCell = row:tag('th') -- id for aria-labelledby attribute, if lone group with no title or above if listnum == 1 and not (args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group2]) then groupCell :attr('id', mw.uri.anchorEncode(args[cfg.arg.group1])) end groupCell :attr('scope', 'row') :addClass(cfg.class.navbox_group) :addClass(args[cfg.arg.groupclass]) :cssText(args[cfg.arg.basestyle]) -- If groupwidth not specified, minimize width :css('width', args[cfg.arg.groupwidth] or '1%') groupCell :cssText(args[cfg.arg.groupstyle]) :cssText(args[groupstyle_and_num]) :wikitext(args[group_and_num]) end local listCell = row:tag('td') if args[group_and_num] then listCell :addClass(cfg.class.navbox_list_with_group) else listCell:attr('colspan', 2) end if not args[cfg.arg.groupwidth] then listCell:css('width', '100%') end local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing if index % 2 == 1 then rowstyle = args[cfg.arg.oddstyle] else rowstyle = args[cfg.arg.evenstyle] end local list_and_num = format(cfg.arg.list_and_num, listnum) local listText = args[list_and_num] local oddEven = cfg.marker.oddeven if listText:sub(1, 12) == '</div><table' then -- Assume list text is for a subgroup navbox so no automatic striping for this row. oddEven = listText:find(cfg.pattern.navbox_title) and cfg.marker.restart or cfg.class.navbox_odd_part end local liststyle_and_num = format(cfg.arg.liststyle_and_num, listnum) local listclass_and_num = format(cfg.arg.listclass_and_num, listnum) listCell :css('padding', '0') :cssText(args[cfg.arg.liststyle]) :cssText(rowstyle) :cssText(args[liststyle_and_num]) :addClass(cfg.class.navbox_list) :addClass(cfg.class.navbox_part .. oddEven) :addClass(args[cfg.arg.listclass]) :addClass(args[listclass_and_num]) :tag('div') :css('padding', (index == 1 and args[cfg.arg.list1padding]) or args[cfg.arg.listpadding] or '0 0.25em' ) :wikitext(processItem(listText, args[cfg.arg.nowrapitems])) if index == 1 and args[cfg.arg.image] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 0 0 2px') :cssText(args[cfg.arg.imagestyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.image])) end end -- uses this now to make the needHlistCategory correct -- to use later for when we add list styles via navbox local function has_list_class(htmlclass) local class_args = { -- rough order of probability of use cfg.arg.bodyclass, cfg.arg.listclass, cfg.arg.aboveclass, cfg.arg.belowclass, cfg.arg.titleclass, cfg.arg.navboxclass, cfg.arg.groupclass, cfg.arg.imageclass } local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for _, arg in ipairs(class_args) do for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end return false end local function needsHorizontalLists(border) if border == cfg.keyword.border_subgroup or args[cfg.arg.tracking] == cfg.keyword.tracking_no then return false end return not has_list_class(cfg.pattern.hlist) and not has_list_class(cfg.pattern.plainlist) end local function hasBackgroundColors() for _, key in ipairs({cfg.arg.titlestyle, cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('background', 1, true) then return true end end return false end local function hasBorders() for _, key in ipairs({cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('border', 1, true) then return true end end return false end local function isIllegible() local styleratio = require('Module:Color contrast')._styleratio for key, style in pairs(args) do if tostring(key):match(cfg.pattern.style) then if styleratio{mw.text.unstripNoWiki(style)} < 4.5 then return true end end end return false end local function getTrackingCategories(border) local cats = {} if needsHorizontalLists(border) then table.insert(cats, cfg.category.horizontal_lists) end if hasBackgroundColors() then table.insert(cats, cfg.category.background_colors) end if isIllegible() then table.insert(cats, cfg.category.illegible) end if hasBorders() then table.insert(cats, cfg.category.borders) end return cats end local function renderTrackingCategories(builder, border) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 then return end -- not in template space local subpage = title.subpageText if subpage == cfg.keyword.subpage_doc or subpage == cfg.keyword.subpage_sandbox or subpage == cfg.keyword.subpage_testcases then return end for _, cat in ipairs(getTrackingCategories(border)) do builder:wikitext('[[Category:' .. cat .. ']]') end end local function renderMainTable(border, listnums) local tbl = mw.html.create('table') :addClass(cfg.class.nowraplinks) :addClass(args[cfg.arg.bodyclass]) local state = args[cfg.arg.state] if args[cfg.arg.title] and state ~= cfg.keyword.state_plain and state ~= cfg.keyword.state_off then if state == cfg.keyword.state_collapsed then state = cfg.class.collapsed end tbl :addClass(cfg.class.collapsible) :addClass(state or cfg.class.autocollapse) end tbl:css('border-spacing', 0) if border == cfg.keyword.border_subgroup or border == cfg.keyword.border_none then tbl :addClass(cfg.class.navbox_subgroup) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) else -- regular navbox - bodystyle and style will be applied to the wrapper table tbl :addClass(cfg.class.navbox_inner) :css('background', 'transparent') :css('color', 'inherit') end tbl:cssText(args[cfg.arg.innerstyle]) renderTitleRow(tbl) renderAboveRow(tbl) local listnums_size = #listnums for i, listnum in ipairs(listnums) do renderListRow(tbl, i, listnum, listnums_size) end renderBelowRow(tbl) return tbl end local function add_navbox_styles() local frame = mw.getCurrentFrame() -- This is a lambda so that it doesn't need the frame as a parameter local function add_user_styles(templatestyles) if templatestyles and templatestyles ~= '' then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } end return '' end -- get templatestyles. load base from config so that Lua only needs to do -- the work once of parser tag expansion local base_templatestyles = cfg.templatestyles local templatestyles = add_user_styles(args[cfg.arg.templatestyles]) local child_templatestyles = add_user_styles(args[cfg.arg.child_templatestyles]) -- The 'navbox-styles' div exists for two reasons: -- 1. To wrap the styles to work around T200206 more elegantly. Instead -- of combinatorial rules, this ends up being linear number of CSS rules. -- 2. To allow MobileFrontend to rip the styles out with 'nomobile' such that -- they are not dumped into the mobile view. return mw.html.create('div') :addClass(cfg.class.navbox_styles) :addClass(cfg.class.nomobile) :wikitext(base_templatestyles .. templatestyles .. child_templatestyles) :done() end function p._navbox(navboxArgs) args = navboxArgs local listnums = {} for k, _ in pairs(args) do if type(k) == 'string' then local listnum = k:match(cfg.pattern.listnum) if listnum then table.insert(listnums, tonumber(listnum)) end end end table.sort(listnums) local border = mw.text.trim(args[cfg.arg.border] or args[1] or '') if border == cfg.keyword.border_child then border = cfg.keyword.border_subgroup end -- render the main body of the navbox local tbl = renderMainTable(border, listnums) local res = mw.html.create() -- render the appropriate wrapper for the navbox, based on the border param if border == cfg.keyword.border_none then res:node(add_navbox_styles()) local nav = res:tag('div') :attr('role', 'navigation') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode( args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1] ) ) else nav:attr('aria-label', cfg.aria_label) end elseif border == cfg.keyword.border_subgroup then -- We assume that this navbox is being rendered in a list cell of a -- parent navbox, and is therefore inside a div with padding:0em 0.25em. -- We start with a </div> to avoid the padding being applied, and at the -- end add a <div> to balance out the parent's </div> res :wikitext('</div>') :node(tbl) :wikitext('<div>') else res:node(add_navbox_styles()) local nav = res:tag('div') :attr('role', 'navigation') :addClass(cfg.class.navbox) :addClass(args[cfg.arg.navboxclass]) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) :css('padding', '3px') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode(args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1]) ) else nav:attr('aria-label', cfg.aria_label) end end if (args[cfg.arg.nocat] or cfg.keyword.nocat_false):lower() == cfg.keyword.nocat_false then renderTrackingCategories(res, border) end return striped(tostring(res), border) end function p.navbox(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end args = getArgs(frame, {wrappers = {cfg.pattern.navbox}}) -- Read the arguments in the order they'll be output in, to make references -- number in the right order. local _ _ = args[cfg.arg.title] _ = args[cfg.arg.above] -- Limit this to 20 as covering 'most' cases (that's a SWAG) and because -- iterator approach won't work here for i = 1, 20 do _ = args[format(cfg.arg.group_and_num, i)] _ = args[format(cfg.arg.list_and_num, i)] end _ = args[cfg.arg.below] return p._navbox(args) end return p 5bbd6589b208bd567b351b855083c132c16a0fb9 Module:Navbox/configuration 828 102 262 2022-01-07T21:39:52Z en>Izno 0 remove titlegroup Scribunto text/plain return { aria_label = 'Navbox', nowrap_item = '%s<span class="nowrap">%s</span>', templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' } }, -- do not localize marker table marker = { oddeven = '\127_ODDEVEN_\127', restart = '\127_ODDEVEN0_\127', regex = '\127_ODDEVEN(%d?)_\127' }, category = { orphan = '[[Category:Navbox orphans]]', horizontal_lists = 'Navigational boxes without horizontal lists', background_colors = 'Navboxes using background colours', illegible = 'Potentially illegible navboxes', borders = 'Navboxes using borders', }, keyword = { border_subgroup = 'subgroup', border_child = 'child', border_none = 'none', evenodd_swap = 'swap', navbar_off = 'off', navbar_plain = 'plain', nocat_false = 'false', nowrapitems_yes = 'yes', orphan_yes = 'yes', state_collapsed = 'collapsed', state_off = 'off', state_plain = 'plain', subpage_doc = 'doc', subpage_sandbox = 'sandbox', subpage_testcases = 'testcases', tracking_no = 'no' }, class = { autocollapse = 'autocollapse', collapsible = 'mw-collapsible', collapsed = 'mw-collapsed', -- Warning navbox = 'navbox', -- WMF currently hides 'navbox' from mobile, -- so you probably shouldn't change the navbox class. navbox_abovebelow = 'navbox-abovebelow', navbox_group = 'navbox-group', navbox_image = 'navbox-image', navbox_inner = 'navbox-inner', navbox_list = 'navbox-list', navbox_list_with_group = 'navbox-list-with-group', navbox_part = 'navbox-', -- do not l10n navbox_styles = 'navbox-styles', navbox_subgroup = 'navbox-subgroup', navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below navbox_odd_part = 'odd', -- do not l10n navbox_even_part = 'even', -- do not l10n nomobile = 'nomobile', nowraplinks = 'nowraplinks', noviewer = 'noviewer' -- used to remove images from MediaViewer }, pattern = { listnum = '^list(%d+)$', sandbox = '/sandbox$', navbox = 'Template:Navbox', nowrap = '^<span class="nowrap">', style = 'style$', navbox_title = '<th[^>]*"navbox%-title"', hlist = 'hlist', plainlist = 'plainlist' }, arg = { above = 'above', aboveclass = 'aboveclass', abovestyle = 'abovestyle', basestyle = 'basestyle', bodyclass = 'bodyclass', bodystyle = 'bodystyle', border = 'border', below = 'below', belowclass = 'belowclass', belowstyle = 'belowstyle', evenodd = 'evenodd', evenstyle = 'evenstyle', group1 = 'group1', group2 = 'group2', group_and_num = 'group%d', groupstyle_and_num = 'group%dstyle', groupclass = 'groupclass', groupstyle = 'groupstyle', groupwidth = 'groupwidth', innerstyle = 'innerstyle', image = 'image', imageclass = 'imageclass', imageleft = 'imageleft', imageleftstyle = 'imageleftstyle', imagesetyle = 'imagestyle', list_and_num = 'list%d', listclass_and_num = 'list%dclass', liststyle_and_num = 'list%dstyle', list1padding = 'list1padding', listclass = 'listclass', listpadding = 'listpadding', liststyle = 'liststyle', name = 'name', navbar = 'navbar', navboxclass = 'navboxclass', nocat = 'nocat', nowrapitems = 'nowrapitems', oddstyle = 'oddstyle', orphan = 'orphan', state = 'state', style = 'style', templatestyles = 'templatestyles', child_templatestyles = 'child templatestyles', title = 'title', titleclass = 'titleclass', titlestyle = 'titlestyle', tracking = 'tracking' }, -- names of navbar arguments navbar = { name = 1, fontstyle = 'fontstyle', mini = 'mini' } } 4a1fb97efbf7aa8a852959457b43eab420073194 Module:Documentation 828 43 81 2022-01-16T01:32:10Z en>Matt Fitzpatrick 0 sync from sandbox, add aria role and label to container Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return '<span class="' .. message('toolbar-class') .. '">(' .. table.concat(ret, ' &#124; ') .. ')</span>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.fullUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[Image:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') else pagetype = message('sandbox-notice-pagetype-other') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(message('sandbox-category')) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end local data = {} data.title = title data.docTitle = docTitle -- View, display, edit, and purge links if /doc exists. data.viewLinkDisplay = message('view-link-display') data.editLinkDisplay = message('edit-link-display') data.historyLinkDisplay = message('history-link-display') data.purgeLinkDisplay = message('purge-link-display') -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end data.preload = preload data.createLinkDisplay = message('create-link-display') return data end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local function escapeBrackets(s) -- Escapes square brackets with HTML entities. s = s:gsub('%[', '&#91;') -- Replace square brackets with HTML entities. s = s:gsub('%]', '&#93;') return s end local ret local docTitle = data.docTitle local title = data.title local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay) local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay) ret = '[%s] [%s] [%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink) else local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) ret = '[%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, createLink, purgeLink) end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editUrl = docTitle:fullUrl{action = 'edit'} local editDisplay = message('edit-link-display') local editLink = makeUrlLink(editUrl, editDisplay) local historyUrl = docTitle:fullUrl{action = 'history'} local historyDisplay = message('history-link-display') local historyLink = makeUrlLink(historyUrl, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'} local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p 95ab9de543475e37250dc94558a5508a3c7c3dfc Module:Infobox/styles.css 828 51 97 2022-01-18T15:18:00Z en>Jdlrobson 0 Fix [[phab:T281642]], a pet peeve of mine. This copies across styles from [[MediaWiki:Minerva.css]] text text/plain /* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; } .infobox-3cols-child { margin: auto; } .infobox .navbar { font-size: 100%; } /* T281642 */ body.skin-minerva .infobox-header, body.skin-minerva .infobox-subheader, body.skin-minerva .infobox-above, body.skin-minerva .infobox-title, body.skin-minerva .infobox-image, body.skin-minerva .infobox-full-data, body.skin-minerva .infobox-below { text-align: center; } e8de6d96f4fde53afc4a6b0fed534405ab59b0a7 Template:Country data Bolivia 10 132 326 2022-01-24T05:45:08Z wikipedia>Paine Ellsworth 0 use AWB to add navy variant wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Bolivia | flag alias = Bandera de Bolivia (Estado).svg | flag alias-state = Bandera de Bolivia (Estado).svg | flag alias-football = Bandera de Bolivia (Estado).svg | flag alias-spain = Flag of Cross of Burgundy.svg | flag alias-1825 = State flag of Bolivia (1825-1826).svg | flag alias-1825a = Civil flag of Bolivia (1825-1826).svg | flag alias-1831 = Flag of Bolivia (state, 1826-1851).svg | flag alias-1831a = Flag of Bolivia (1826-1851).svg | flag alias-confederation = Flag of the Peru-Bolivian Confederation.svg | flag alias-wiphala = Banner of the Qulla Suyu.svg | flag alias-patuju = | flag alias-army=Flag of Bolivia (military).svg | link alias-army=Bolivian Army | flag alias-air force=Flag of Bolivia (military).svg | link alias-air force=Bolivian Air Force | flag alias-naval = Naval Ensign of Bolivia.svg | link alias-naval = Bolivian Naval Force | flag alias-naval old = Naval Ensign of Bolivia (1966-2013).svg | flag alias-naval jack = Naval Jack of Bolivia.svg | flag alias-military = Flag of Bolivia (military).svg | link alias-military = Bolivian Armed Forces | flag alias-navy = Naval Ensign of Bolivia.svg | link alias-navy = Bolivian Naval Force | flag alias-civil = Flag of Bolivia.svg | size = {{{size|}}} | name = {{{name|}}} | altvar = {{{altvar|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = state | var2 = football | var3 = spain | var4 = 1825 | var5 = 1825a | var6 = 1831 | var7 = 1831a | var8 = confederation | var9 = wiphala | var10 = patuju | var11 = naval old | var12 = naval jack | var13 = civil | redir1 = BOL </noinclude> }} 369ece052134be958349df9e20f2620b87127dba Template:Country data Kazakhstan 10 145 352 2022-01-24T06:47:46Z wikipedia>Paine Ellsworth 0 use AWB to add navy variant wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Kazakhstan | flag alias = Flag of Kazakhstan.svg | flag alias-1991 = Flag of the Kazakh SSR.svg | flag alias-1992 = Flag of Kazakhstan (1992).svg | flag alias-naval = Naval Ensign of Kazakhstan.svg | link alias-naval = Kazakh Naval Forces | flag alias-air force = Ensign of Kazakhstan Air Force.svg | link alias-air force = Kazakh Air Defense Forces | flag alias-army = Kazakhstan Armed Forces Flag.svg | link alias-army = Kazakh Ground Forces | flag alias-navy = Naval Ensign of Kazakhstan.svg | link alias-navy = Kazakh Naval Forces | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} | var1 = 1991 | var2 = 1992 <noinclude> | redir1 = KAZ | related1 = Kazakh SSR </noinclude> }} 770be6119a2f31c0af66781c3f5b131a6e3f20e7 Template:Country data Ethiopia 10 138 338 2022-01-24T23:42:21Z wikipedia>Paine Ellsworth 0 use AWB to add navy variant wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Ethiopia | flag alias = Flag of Ethiopia.svg | flag alias-1897 = Flag of Ethiopia (1897-1936; 1941-1974).svg | flag alias-1975 = Flag of Ethiopia (1975–1987).svg | flag alias-1975-state = Flag of Ethiopia (1975–1987) (02).svg | flag alias-1987 = Flag of Ethiopia (1987-1991).svg | flag alias-1991 = Flag of Ethiopia (1991-1996).svg | flag alias-1996 = Flag of Ethiopia (1996-2009).svg | flag alias-naval = Flag of Ethiopia (1975–1987).svg | link alias-naval = Ethiopian Navy | link alias-air force = Ethiopian Air Force | flag alias-air force = Ethiopian Air Force flag.svg | link alias-army = Ethiopian Ground Forces | flag alias-navy = Flag of Ethiopia (1975–1987).svg | link alias-navy = Ethiopian Navy | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1897 | var2 = 1975 | var3 = 1975-state | var4 = 1987 | var5 = 1991 | var6 = 1996 | redir1 = ETH | related1 = Ethiopian Empire </noinclude> }} 1d9b0cf28e53e65a036039cf3c34693b1e47cd4d Template:Country data Gabon 10 140 342 2022-01-24T23:48:49Z wikipedia>Paine Ellsworth 0 use AWB to add navy variant wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Gabon | flag alias = Flag of Gabon.svg | flag alias-1959 = Flag of Gabon 1959-1960.svg | link alias-naval = Gabonese Navy | link alias-air force = Gabonese Air Force | link alias-army = Gabonese Army | link alias-navy = Gabonese Navy | size = {{{size|}}} | name = {{{name|}}} | variant = {{{variant|}}} | altlink = {{{altlink|}}} <noinclude> | redir1 = GAB | var1 = 1959 </noinclude> }} 81019b1525232911a87962d5ac2eefadb45b5b4a Template:Country data Lebanon 10 146 354 2022-01-25T00:20:55Z wikipedia>Paine Ellsworth 0 use AWB to add navy variant + noinclude var = wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Lebanon | flag alias = Flag of Lebanon.svg | flag alias-air force = Flag of the Lebanese Air Force.svg | link alias-air force = Lebanese Air Force | flag alias-army = Lebanesearmyfirstflag.png | link alias-army = Lebanese Ground Forces | link alias-naval = Lebanese Navy | link alias-navy = Lebanese Navy | flag alias-1918 = Cedar flag.svg | flag alias-1920 = Lebanese French flag.svg | link alias-1920 = Greater Lebanon | size = {{{size|}}} | name = {{{name|}}} | variant = {{{variant|}}} | altlink = {{{altlink|}}} <noinclude> | var1 = 1918 | var2 = 1920 | redir1 = LBN | redir2 = LIB </noinclude> }} ff6b6bf3a567ba7b8e50a8e7684e8784ab99d411 Module:TableTools 828 62 119 2022-01-31T13:08:18Z en>MSGJ 0 updates/fixes requested by [[User:Uzume]] Scribunto text/plain ------------------------------------------------------------------------------------ -- TableTools -- -- -- -- This module includes a number of functions for dealing with Lua tables. -- -- It is a meta-module, meant to be called from other Lua modules, and should not -- -- be called directly from #invoke. -- ------------------------------------------------------------------------------------ local libraryUtil = require('libraryUtil') local p = {} -- Define often-used variables and functions. local floor = math.floor local infinity = math.huge local checkType = libraryUtil.checkType local checkTypeMulti = libraryUtil.checkTypeMulti ------------------------------------------------------------------------------------ -- isPositiveInteger -- -- This function returns true if the given value is a positive integer, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a given table key is in the array part or the -- hash part of a table. ------------------------------------------------------------------------------------ function p.isPositiveInteger(v) return type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity end ------------------------------------------------------------------------------------ -- isNan -- -- This function returns true if the given number is a NaN value, and false if -- not. Although it doesn't operate on tables, it is included here as it is useful -- for determining whether a value can be a valid table key. Lua will generate an -- error if a NaN is used as a table key. ------------------------------------------------------------------------------------ function p.isNan(v) return type(v) == 'number' and v ~= v end ------------------------------------------------------------------------------------ -- shallowClone -- -- This returns a clone of a table. The value returned is a new table, but all -- subtables and functions are shared. Metamethods are respected, but the returned -- table will have no metatable of its own. ------------------------------------------------------------------------------------ function p.shallowClone(t) checkType('shallowClone', 1, t, 'table') local ret = {} for k, v in pairs(t) do ret[k] = v end return ret end ------------------------------------------------------------------------------------ -- removeDuplicates -- -- This removes duplicate values from an array. Non-positive-integer keys are -- ignored. The earliest value is kept, and all subsequent duplicate values are -- removed, but otherwise the array order is unchanged. ------------------------------------------------------------------------------------ function p.removeDuplicates(arr) checkType('removeDuplicates', 1, arr, 'table') local isNan = p.isNan local ret, exists = {}, {} for _, v in ipairs(arr) do if isNan(v) then -- NaNs can't be table keys, and they are also unique, so we don't need to check existence. ret[#ret + 1] = v else if not exists[v] then ret[#ret + 1] = v exists[v] = true end end end return ret end ------------------------------------------------------------------------------------ -- numKeys -- -- This takes a table and returns an array containing the numbers of any numerical -- keys that have non-nil values, sorted in numerical order. ------------------------------------------------------------------------------------ function p.numKeys(t) checkType('numKeys', 1, t, 'table') local isPositiveInteger = p.isPositiveInteger local nums = {} for k in pairs(t) do if isPositiveInteger(k) then nums[#nums + 1] = k end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- affixNums -- -- This takes a table and returns an array containing the numbers of keys with the -- specified prefix and suffix. For example, for the table -- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will return -- {1, 3, 6}. ------------------------------------------------------------------------------------ function p.affixNums(t, prefix, suffix) checkType('affixNums', 1, t, 'table') checkType('affixNums', 2, prefix, 'string', true) checkType('affixNums', 3, suffix, 'string', true) local function cleanPattern(s) -- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally. return s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1') end prefix = prefix or '' suffix = suffix or '' prefix = cleanPattern(prefix) suffix = cleanPattern(suffix) local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' local nums = {} for k in pairs(t) do if type(k) == 'string' then local num = mw.ustring.match(k, pattern) if num then nums[#nums + 1] = tonumber(num) end end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- numData -- -- Given a table with keys like {"foo1", "bar1", "foo2", "baz2"}, returns a table -- of subtables in the format -- {[1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'}}. -- Keys that don't end with an integer are stored in a subtable named "other". The -- compress option compresses the table so that it can be iterated over with -- ipairs. ------------------------------------------------------------------------------------ function p.numData(t, compress) checkType('numData', 1, t, 'table') checkType('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs(t) do local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$') if num then num = tonumber(num) local subtable = ret[num] or {} if prefix == '' then -- Positional parameters match the blank string; put them at the start of the subtable instead. prefix = 1 end subtable[prefix] = v ret[num] = subtable else local subtable = ret.other or {} subtable[k] = v ret.other = subtable end end if compress then local other = ret.other ret = p.compressSparseArray(ret) ret.other = other end return ret end ------------------------------------------------------------------------------------ -- compressSparseArray -- -- This takes an array with one or more nil values, and removes the nil values -- while preserving the order, so that the array can be safely traversed with -- ipairs. ------------------------------------------------------------------------------------ function p.compressSparseArray(t) checkType('compressSparseArray', 1, t, 'table') local ret = {} local nums = p.numKeys(t) for _, num in ipairs(nums) do ret[#ret + 1] = t[num] end return ret end ------------------------------------------------------------------------------------ -- sparseIpairs -- -- This is an iterator for sparse arrays. It can be used like ipairs, but can -- handle nil values. ------------------------------------------------------------------------------------ function p.sparseIpairs(t) checkType('sparseIpairs', 1, t, 'table') local nums = p.numKeys(t) local i = 0 local lim = #nums return function () i = i + 1 if i <= lim then local key = nums[i] return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- size -- -- This returns the size of a key/value pair table. It will also work on arrays, -- but for arrays it is more efficient to use the # operator. ------------------------------------------------------------------------------------ function p.size(t) checkType('size', 1, t, 'table') local i = 0 for _ in pairs(t) do i = i + 1 end return i end local function defaultKeySort(item1, item2) -- "number" < "string", so numbers will be sorted before strings. local type1, type2 = type(item1), type(item2) if type1 ~= type2 then return type1 < type2 elseif type1 == 'table' or type1 == 'boolean' or type1 == 'function' then return tostring(item1) < tostring(item2) else return item1 < item2 end end ------------------------------------------------------------------------------------ -- keysToList -- -- Returns an array of the keys in a table, sorted using either a default -- comparison function or a custom keySort function. ------------------------------------------------------------------------------------ function p.keysToList(t, keySort, checked) if not checked then checkType('keysToList', 1, t, 'table') checkTypeMulti('keysToList', 2, keySort, {'function', 'boolean', 'nil'}) end local arr = {} local index = 1 for k in pairs(t) do arr[index] = k index = index + 1 end if keySort ~= false then keySort = type(keySort) == 'function' and keySort or defaultKeySort table.sort(arr, keySort) end return arr end ------------------------------------------------------------------------------------ -- sortedPairs -- -- Iterates through a table, with the keys sorted using the keysToList function. -- If there are only numerical keys, sparseIpairs is probably more efficient. ------------------------------------------------------------------------------------ function p.sortedPairs(t, keySort) checkType('sortedPairs', 1, t, 'table') checkType('sortedPairs', 2, keySort, 'function', true) local arr = p.keysToList(t, keySort, true) local i = 0 return function () i = i + 1 local key = arr[i] if key ~= nil then return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- isArray -- -- Returns true if the given value is a table and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArray(v) if type(v) ~= 'table' then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- isArrayLike -- -- Returns true if the given value is iterable and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArrayLike(v) if not pcall(pairs, v) then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- invert -- -- Transposes the keys and values in an array. For example, {"a", "b", "c"} -> -- {a = 1, b = 2, c = 3}. Duplicates are not supported (result values refer to -- the index of the last duplicate) and NaN values are ignored. ------------------------------------------------------------------------------------ function p.invert(arr) checkType("invert", 1, arr, "table") local isNan = p.isNan local map = {} for i, v in ipairs(arr) do if not isNan(v) then map[v] = i end end return map end ------------------------------------------------------------------------------------ -- listToSet -- -- Creates a set from the array part of the table. Indexing the set by any of the -- values of the array returns true. For example, {"a", "b", "c"} -> -- {a = true, b = true, c = true}. NaN values are ignored as Lua considers them -- never equal to any value (including other NaNs or even themselves). ------------------------------------------------------------------------------------ function p.listToSet(arr) checkType("listToSet", 1, arr, "table") local isNan = p.isNan local set = {} for _, v in ipairs(arr) do if not isNan(v) then set[v] = true end end return set end ------------------------------------------------------------------------------------ -- deepCopy -- -- Recursive deep copy function. Preserves identities of subtables. ------------------------------------------------------------------------------------ local function _deepCopy(orig, includeMetatable, already_seen) -- Stores copies of tables indexed by the original table. already_seen = already_seen or {} local copy = already_seen[orig] if copy ~= nil then return copy end if type(orig) == 'table' then copy = {} for orig_key, orig_value in pairs(orig) do copy[_deepCopy(orig_key, includeMetatable, already_seen)] = _deepCopy(orig_value, includeMetatable, already_seen) end already_seen[orig] = copy if includeMetatable then local mt = getmetatable(orig) if mt ~= nil then local mt_copy = _deepCopy(mt, includeMetatable, already_seen) setmetatable(copy, mt_copy) already_seen[mt] = mt_copy end end else -- number, string, boolean, etc copy = orig end return copy end function p.deepCopy(orig, noMetatable, already_seen) checkType("deepCopy", 3, already_seen, "table", true) return _deepCopy(orig, not noMetatable, already_seen) end ------------------------------------------------------------------------------------ -- sparseConcat -- -- Concatenates all values in the table that are indexed by a number, in order. -- sparseConcat{a, nil, c, d} => "acd" -- sparseConcat{nil, b, c, d} => "bcd" ------------------------------------------------------------------------------------ function p.sparseConcat(t, sep, i, j) local arr = {} local arr_i = 0 for _, v in p.sparseIpairs(t) do arr_i = arr_i + 1 arr[arr_i] = v end return table.concat(arr, sep, i, j) end ------------------------------------------------------------------------------------ -- length -- -- Finds the length of an array, or of a quasi-array with keys such as "data1", -- "data2", etc., using an exponential search algorithm. It is similar to the -- operator #, but may return a different value when there are gaps in the array -- portion of the table. Intended to be used on data loaded with mw.loadData. For -- other tables, use #. -- Note: #frame.args in frame object always be set to 0, regardless of the number -- of unnamed template parameters, so use this function for frame.args. ------------------------------------------------------------------------------------ function p.length(t, prefix) -- requiring module inline so that [[Module:Exponential search]] which is -- only needed by this one function doesn't get millions of transclusions local expSearch = require("Module:Exponential search") checkType('length', 1, t, 'table') checkType('length', 2, prefix, 'string', true) return expSearch(function (i) local key if prefix then key = prefix .. tostring(i) else key = i end return t[key] ~= nil end) or 0 end ------------------------------------------------------------------------------------ -- inArray -- -- Returns true if valueToFind is a member of the array, and false otherwise. ------------------------------------------------------------------------------------ function p.inArray(arr, valueToFind) checkType("inArray", 1, arr, "table") -- if valueToFind is nil, error? for _, v in ipairs(arr) do if v == valueToFind then return true end end return false end return p 085e7094ac84eb0132ee65822cf3f69cd8ba3d81 Template:Country data Nigeria 10 147 356 2022-02-03T20:35:56Z wikipedia>Mjroots 0 + Civil ensign wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Nigeria | flag alias = Flag of Nigeria.svg | flag alias-colonial = Flag of Nigeria (1914–1952).svg | flag alias-naval = Naval Ensign of Nigeria.svg | link alias-naval = Nigerian Navy | flag alias-army = Flag of the Nigerian Army Headquarters.svg | link alias-army = Nigerian Army | flag alias-military=Flag of the Nigerian Armed Forces.svg | link alias-military=Nigerian Armed Forces | flag alias-air force = Air Force Ensign of Nigeria.svg | link alias-air force = Nigerian Air Force | flag alias-navy = Naval Ensign of Nigeria.svg | link alias-navy = Nigerian Navy | flag alias-civil = Civil Ensign of Nigeria.svg | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = colonial | var2 = civil | redir1 = NGA | redir2 = NGR </noinclude> }} 63a77faf3e62e78e1c41cfdb6d2fd883bf074739 Module:Protection banner/config 828 60 115 2022-02-03T23:49:55Z en>Andrybak 0 add categorization into [[:Category:Wikipedia extended-confirmed-protected modules]] per [[Special:Diff/1069761256|request]] Scribunto text/plain -- This module provides configuration data for [[Module:Protection banner]]. return { -------------------------------------------------------------------------------- -- -- BANNER DATA -- -------------------------------------------------------------------------------- --[[ -- Banner data consists of six fields: -- * text - the main protection text that appears at the top of protection -- banners. -- * explanation - the text that appears below the main protection text, used -- to explain the details of the protection. -- * tooltip - the tooltip text you see when you move the mouse over a small -- padlock icon. -- * link - the page that the small padlock icon links to. -- * alt - the alt text for the small padlock icon. This is also used as tooltip -- text for the large protection banners. -- * image - the padlock image used in both protection banners and small padlock -- icons. -- -- The module checks in three separate tables to find a value for each field. -- First it checks the banners table, which has values specific to the reason -- for the page being protected. Then the module checks the defaultBanners -- table, which has values specific to each protection level. Finally, the -- module checks the masterBanner table, which holds data for protection -- templates to use if no data has been found in the previous two tables. -- -- The values in the banner data can take parameters. These are specified -- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name -- enclosed in curly braces). -- -- Available parameters: -- -- ${CURRENTVERSION} - a link to the page history or the move log, with the -- display message "current-version-edit-display" or -- "current-version-move-display". -- -- ${EDITREQUEST} - a link to create an edit request for the current page. -- -- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes -- on the talk page; you may submit a request to ask an administrator to make -- an edit if it is minor or supported by consensus." -- -- ${IMAGELINK} - a link to set the image to, depending on the protection -- action and protection level. -- -- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry -- is set. E.g. "Editing of this page by new or unregistered users is currently -- disabled until dd Month YYYY." -- -- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation -- so that it can be used in run-on sentences. -- -- ${PAGETYPE} - the type of the page, e.g. "article" or "template". -- Defined in the cfg.pagetypes table. -- -- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g. -- "Editing of this page by new or unregistered users is currently disabled" -- -- ${PROTECTIONDATE} - the protection date, if it has been supplied to the -- template. -- -- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or -- "semi-protected". -- -- ${PROTECTIONLOG} - a link to the protection log or the pending changes log, -- depending on the protection action. -- -- ${TALKPAGE} - a link to the talk page. If a section is specified, links -- straight to that talk page section. -- -- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to -- create a blurb like "This template is semi-protected", or "This article is -- move-protected until DD Month YYYY". -- -- ${VANDAL} - links for the specified username (or the root page name) -- using Module:Vandal-m. -- -- Functions -- -- For advanced users, it is possible to use Lua functions instead of strings -- in the banner config tables. Using functions gives flexibility that is not -- possible just by using parameters. Functions take two arguments, the -- protection object and the template arguments, and they must output a string. -- -- For example: -- -- text = function (protectionObj, args) -- if protectionObj.level == 'autoconfirmed' then -- return 'foo' -- else -- return 'bar' -- end -- end -- -- Some protection object properties and methods that may be useful: -- protectionObj.action - the protection action -- protectionObj.level - the protection level -- protectionObj.reason - the protection reason -- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set -- to indefinite, and the protection time in unix time if temporary. -- protectionObj.protectionDate - the protection date in unix time, or nil if -- unspecified. -- protectionObj.bannerConfig - the banner config found by the module. Beware -- of editing the config field used by the function, as it could create an -- infinite loop. -- protectionObj:isProtected - returns a boolean showing whether the page is -- protected. -- protectionObj:isTemporary - returns a boolean showing whether the expiry is -- temporary. -- protectionObj:isIncorrect - returns a boolean showing whether the protection -- template is incorrect. --]] -- The master banner data, used if no values have been found in banners or -- defaultBanners. masterBanner = { text = '${INTROBLURB}', explanation = '${EXPLANATIONBLURB}', tooltip = '${TOOLTIPBLURB}', link = '${IMAGELINK}', alt = 'Page ${PROTECTIONLEVEL}' }, -- The default banner data. This holds banner data for different protection -- levels. -- *required* - this table needs edit, move, autoreview and upload subtables. defaultBanners = { edit = {}, move = {}, autoreview = { default = { alt = 'Page protected with pending changes', tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users', image = 'Pending-protection-shackle.svg' } }, upload = {} }, -- The banner data. This holds banner data for different protection reasons. -- In fact, the reasons specified in this table control which reasons are -- valid inputs to the first positional parameter. -- -- There is also a non-standard "description" field that can be used for items -- in this table. This is a description of the protection reason for use in the -- module documentation. -- -- *required* - this table needs edit, move, autoreview and upload subtables. banners = { edit = { blp = { description = 'For pages protected to promote compliance with the' .. ' [[Wikipedia:Biographies of living persons' .. '|biographies of living persons]] policy', text = '${INTROFRAGMENT} to promote compliance with' .. ' [[Wikipedia:Biographies of living persons' .. "|Wikipedia's&nbsp;policy on&nbsp;the&nbsp;biographies" .. ' of&nbsp;living&nbsp;people]].', tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on' .. ' biographies of living persons', }, dmca = { description = 'For pages protected by the Wikimedia Foundation' .. ' due to [[Digital Millennium Copyright Act]] takedown requests', explanation = function (protectionObj, args) local ret = 'Pursuant to a rights owner notice under the Digital' .. ' Millennium Copyright Act (DMCA) regarding some content' .. ' in this article, the Wikimedia Foundation acted under' .. ' applicable law and took down and restricted the content' .. ' in question.' if args.notice then ret = ret .. ' A copy of the received notice can be found here: ' .. args.notice .. '.' end ret = ret .. ' For more information, including websites discussing' .. ' how to file a counter-notice, please see' .. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}." .. "'''Do not remove this template from the article until the" .. " restrictions are withdrawn'''." return ret end, image = 'Office-protection-shackle.svg', }, dispute = { description = 'For pages protected due to editing disputes', text = function (protectionObj, args) -- Find the value of "disputes". local display = 'disputes' local disputes if args.section then disputes = string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[protectionObj.title.namespace].talk.name, protectionObj.title.text, args.section, display ) else disputes = display end -- Make the blurb, depending on the expiry. local msg if type(protectionObj.expiry) == 'number' then msg = '${INTROFRAGMENT} or until editing %s have been resolved.' else msg = '${INTROFRAGMENT} until editing %s have been resolved.' end return string.format(msg, disputes) end, explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', tooltip = '${TOOLTIPFRAGMENT} due to editing disputes', }, ecp = { description = 'For articles in topic areas authorized by' .. ' [[Wikipedia:Arbitration Committee|ArbCom]] or' .. ' meets the criteria for community use', tooltip = 'This ${PAGETYPE} is extended-confirmed protected', alt = 'Extended-protected ${PAGETYPE}', }, mainpage = { description = 'For pages protected for being displayed on the [[Main Page]]', text = 'This file is currently' .. ' [[Wikipedia:This page is protected|protected]] from' .. ' editing because it is currently or will soon be displayed' .. ' on the [[Main Page]].', explanation = 'Images on the Main Page are protected due to their high' .. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.' .. '<br /><span style="font-size:90%;">' .. "'''Administrators:''' Once this image is definitely off the Main Page," .. ' please unprotect this file, or reduce to semi-protection,' .. ' as appropriate.</span>', }, office = { description = 'For pages protected by the Wikimedia Foundation', text = function (protectionObj, args) local ret = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.' if protectionObj.protectionDate then ret = ret .. ' It has been protected since ${PROTECTIONDATE}.' end return ret end, explanation = "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not remove protection from this" .. " page unless you are authorized by the Wikimedia Foundation to do" .. " so.'''", image = 'Office-protection-shackle.svg', }, reset = { description = 'For pages protected by the Wikimedia Foundation and' .. ' "reset" to a bare-bones version', text = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.', explanation = function (protectionObj, args) local ret = '' if protectionObj.protectionDate then ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was' else ret = ret .. 'This ${PAGETYPE} has been' end ret = ret .. ' reduced to a' .. ' simplified, "bare bones" version so that it may be completely' .. ' rewritten to ensure it meets the policies of' .. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].' .. ' Standard Wikipedia policies will apply to its rewriting—which' .. ' will eventually be open to all editors—and will be strictly' .. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while' .. ' it is being rebuilt.\n\n' .. 'Any insertion of material directly from' .. ' pre-protection revisions of the ${PAGETYPE} will be removed, as' .. ' will any material added to the ${PAGETYPE} that is not properly' .. ' sourced. The associated talk page(s) were also cleared on the' .. " same date.\n\n" .. "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not override" .. " this action, and do not remove protection from this page," .. " unless you are authorized by the Wikimedia Foundation" .. " to do so. No editor may remove this notice.'''" return ret end, image = 'Office-protection-shackle.svg', }, sock = { description = 'For pages protected due to' .. ' [[Wikipedia:Sock puppetry|sock puppetry]]', text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of' .. ' [[Wikipedia:Blocking policy|blocked]] or' .. ' [[Wikipedia:Banning policy|banned users]]' .. ' from editing it.', tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from' .. ' editing it', }, template = { description = 'For [[Wikipedia:High-risk templates|high-risk]]' .. ' templates and Lua modules', text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},' .. ' as it is [[Wikipedia:High-risk templates|high-risk]].', explanation = 'Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] or' .. ' [[Wikipedia:Template editor|template editor]] to make an edit if' .. ' it is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by' .. ' [[Wikipedia:Consensus|consensus]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}' .. ' to prevent vandalism', alt = 'Permanently protected ${PAGETYPE}', }, usertalk = { description = 'For pages protected against disruptive edits by a' .. ' particular user', text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,' .. ' such as abusing the' .. ' &#123;&#123;[[Template:unblock|unblock]]&#125;&#125; template.', explanation = 'If you cannot edit this user talk page and you need to' .. ' make a change or leave a message, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for edits to a protected page' .. '|request an edit]],' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]],' .. ' [[Special:Userlogin|log in]],' .. ' or [[Special:UserLogin/signup|create an account]].', }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism|vandalism]]', text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].', explanation = function (protectionObj, args) local ret = '' if protectionObj.level == 'sysop' then ret = ret .. "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ' end return ret .. '${EXPLANATIONBLURB}' end, tooltip = '${TOOLTIPFRAGMENT} due to vandalism', } }, move = { dispute = { description = 'For pages protected against page moves due to' .. ' disputes over the page title', explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', image = 'Move-protection-shackle.svg' }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism#Page-move vandalism' .. ' |page-move vandalism]]' } }, autoreview = {}, upload = {} }, -------------------------------------------------------------------------------- -- -- GENERAL DATA TABLES -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Protection blurbs -------------------------------------------------------------------------------- -- This table produces the protection blurbs available with the -- ${PROTECTIONBLURB} parameter. It is sorted by protection action and -- protection level, and is checked by the module in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionBlurbs = { edit = { default = 'This ${PAGETYPE} is currently [[Help:Protection|' .. 'protected]] from editing', autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access' .. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered' .. ' users|unregistered]] users is currently [[Help:Protection|disabled]]', extendedconfirmed = 'This ${PAGETYPE} is currently under extended confirmed protection', }, move = { default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]' .. ' from [[Help:Moving a page|page moves]]' }, autoreview = { default = 'All edits made to this ${PAGETYPE} by' .. ' [[Wikipedia:User access levels#New users|new]] or' .. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]' .. ' users are currently' .. ' [[Wikipedia:Pending changes|subject to review]]' }, upload = { default = 'Uploading new versions of this ${PAGETYPE} is currently disabled' } }, -------------------------------------------------------------------------------- -- Explanation blurbs -------------------------------------------------------------------------------- -- This table produces the explanation blurbs available with the -- ${EXPLANATIONBLURB} parameter. It is sorted by protection action, -- protection level, and whether the page is a talk page or not. If the page is -- a talk page it will have a talk key of "talk"; otherwise it will have a talk -- key of "subject". The table is checked in the following order: -- 1. page's protection action, page's protection level, page's talk key -- 2. page's protection action, page's protection level, default talk key -- 3. page's protection action, default protection level, page's talk key -- 4. page's protection action, default protection level, default talk key -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. explanationBlurbs = { edit = { autoconfirmed = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', }, extendedconfirmed = { default = 'Extended confirmed protection prevents edits from all unregistered editors' .. ' and registered users with fewer than 30 days tenure and 500 edits.' .. ' The [[Wikipedia:Protection policy#extended|policy on community use]]' .. ' specifies that extended confirmed protection can be applied to combat' .. ' disruption, if semi-protection has proven to be ineffective.' .. ' Extended confirmed protection may also be applied to enforce' .. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].' .. ' Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask for uncontroversial changes supported by' .. ' [[Wikipedia:Consensus|consensus]].' }, default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]]. You may also [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|request]] that this page be unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' You may [[Wikipedia:Requests for page' .. ' protection#Current requests for edits to a protected page|request an' .. ' edit]] to this page, or [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|ask]] for it to be unprotected.' } }, move = { default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves on the' .. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves at' .. ' [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.' } }, autoreview = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Edits to this ${PAGETYPE} by new and unregistered users' .. ' will not be visible to readers until they are accepted by' .. ' a reviewer. To avoid the need for your edits to be' .. ' reviewed, you may' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].' }, }, upload = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but new versions of the file' .. ' cannot be uploaded until it is unprotected. You can' .. ' request that a new version be uploaded by using a' .. ' [[Wikipedia:Edit requests|protected edit request]], or you' .. ' can [[Wikipedia:Requests for page protection|request]]' .. ' that the file be unprotected.' } } }, -------------------------------------------------------------------------------- -- Protection levels -------------------------------------------------------------------------------- -- This table provides the data for the ${PROTECTIONLEVEL} parameter, which -- produces a short label for different protection levels. It is sorted by -- protection action and protection level, and is checked in the following -- order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionLevels = { edit = { default = 'protected', templateeditor = 'template-protected', extendedconfirmed = 'extended-protected', autoconfirmed = 'semi-protected', }, move = { default = 'move-protected' }, autoreview = { }, upload = { default = 'upload-protected' } }, -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- This table lists different padlock images for each protection action and -- protection level. It is used if an image is not specified in any of the -- banner data tables, and if the page does not satisfy the conditions for using -- the ['image-filename-indef'] image. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level images = { edit = { default = 'Full-protection-shackle.svg', templateeditor = 'Template-protection-shackle.svg', extendedconfirmed = 'Extended-protection-shackle.svg', autoconfirmed = 'Semi-protection-shackle.svg' }, move = { default = 'Move-protection-shackle.svg', }, autoreview = { default = 'Pending-protection-shackle.svg' }, upload = { default = 'Upload-protection-shackle.svg' } }, -- Pages with a reason specified in this table will show the special "indef" -- padlock, defined in the 'image-filename-indef' message, if no expiry is set. indefImageReasons = { template = true }, -------------------------------------------------------------------------------- -- Image links -------------------------------------------------------------------------------- -- This table provides the data for the ${IMAGELINK} parameter, which gets -- the image link for small padlock icons based on the page's protection action -- and protection level. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. imageLinks = { edit = { default = 'Wikipedia:Protection policy#full', templateeditor = 'Wikipedia:Protection policy#template', extendedconfirmed = 'Wikipedia:Protection policy#extended', autoconfirmed = 'Wikipedia:Protection policy#semi' }, move = { default = 'Wikipedia:Protection policy#move' }, autoreview = { default = 'Wikipedia:Protection policy#pending' }, upload = { default = 'Wikipedia:Protection policy#upload' } }, -------------------------------------------------------------------------------- -- Padlock indicator names -------------------------------------------------------------------------------- -- This table provides the "name" attribute for the <indicator> extension tag -- with which small padlock icons are generated. All indicator tags on a page -- are displayed in alphabetical order based on this attribute, and with -- indicator tags with duplicate names, the last tag on the page wins. -- The attribute is chosen based on the protection action; table keys must be a -- protection action name or the string "default". padlockIndicatorNames = { autoreview = 'pp-autoreview', default = 'pp-default' }, -------------------------------------------------------------------------------- -- Protection categories -------------------------------------------------------------------------------- --[[ -- The protection categories are stored in the protectionCategories table. -- Keys to this table are made up of the following strings: -- -- 1. the expiry date -- 2. the namespace -- 3. the protection reason (e.g. "dispute" or "vandalism") -- 4. the protection level (e.g. "sysop" or "autoconfirmed") -- 5. the action (e.g. "edit" or "move") -- -- When the module looks up a category in the table, first it will will check to -- see a key exists that corresponds to all five parameters. For example, a -- user page semi-protected from vandalism for two weeks would have the key -- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module -- changes the first part of the key to "all" and checks the table again. It -- keeps checking increasingly generic key combinations until it finds the -- field, or until it reaches the key "all-all-all-all-all". -- -- The module uses a binary matrix to determine the order in which to search. -- This is best demonstrated by a table. In this table, the "0" values -- represent "all", and the "1" values represent the original data (e.g. -- "indef" or "file" or "vandalism"). -- -- expiry namespace reason level action -- order -- 1 1 1 1 1 1 -- 2 0 1 1 1 1 -- 3 1 0 1 1 1 -- 4 0 0 1 1 1 -- 5 1 1 0 1 1 -- 6 0 1 0 1 1 -- 7 1 0 0 1 1 -- 8 0 0 0 1 1 -- 9 1 1 1 0 1 -- 10 0 1 1 0 1 -- 11 1 0 1 0 1 -- 12 0 0 1 0 1 -- 13 1 1 0 0 1 -- 14 0 1 0 0 1 -- 15 1 0 0 0 1 -- 16 0 0 0 0 1 -- 17 1 1 1 1 0 -- 18 0 1 1 1 0 -- 19 1 0 1 1 0 -- 20 0 0 1 1 0 -- 21 1 1 0 1 0 -- 22 0 1 0 1 0 -- 23 1 0 0 1 0 -- 24 0 0 0 1 0 -- 25 1 1 1 0 0 -- 26 0 1 1 0 0 -- 27 1 0 1 0 0 -- 28 0 0 1 0 0 -- 29 1 1 0 0 0 -- 30 0 1 0 0 0 -- 31 1 0 0 0 0 -- 32 0 0 0 0 0 -- -- In this scheme the action has the highest priority, as it is the last -- to change, and the expiry has the least priority, as it changes the most. -- The priorities of the expiry, the protection level and the action are -- fixed, but the priorities of the reason and the namespace can be swapped -- through the use of the cfg.bannerDataNamespaceHasPriority table. --]] -- If the reason specified to the template is listed in this table, -- namespace data will take priority over reason data in the protectionCategories -- table. reasonsWithNamespacePriority = { vandalism = true, }, -- The string to use as a namespace key for the protectionCategories table for each -- namespace number. categoryNamespaceKeys = { [ 2] = 'user', [ 3] = 'user', [ 4] = 'project', [ 6] = 'file', [ 8] = 'mediawiki', [ 10] = 'template', [ 12] = 'project', [ 14] = 'category', [100] = 'portal', [828] = 'module', }, protectionCategories = { ['all|all|all|all|all'] = 'Wikipedia fully protected pages', ['all|all|office|all|all'] = 'Wikipedia Office-protected pages', ['all|all|reset|all|all'] = 'Wikipedia Office-protected pages', ['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages', ['all|all|mainpage|all|all'] = 'Wikipedia fully-protected main page files', ['all|all|all|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|template|all|all|edit'] = 'Wikipedia fully protected templates', ['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages', ['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages', ['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people', ['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people', ['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute', ['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users', ['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism', ['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories', ['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files', ['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals', ['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages', ['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages', ['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates', ['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages', ['all|all|all|templateeditor|edit'] = 'Wikipedia template-protected pages other than templates and modules', ['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates', ['all|template|all|templateeditor|move'] = 'Wikipedia template-protected templates', -- move-protected templates ['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people', ['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people', ['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute', ['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users', ['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism', ['all|category|all|sysop|edit'] = 'Wikipedia fully protected categories', ['all|file|all|sysop|edit'] = 'Wikipedia fully-protected files', ['all|project|all|sysop|edit'] = 'Wikipedia fully-protected project pages', ['all|talk|all|sysop|edit'] = 'Wikipedia fully-protected talk pages', ['all|template|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates', ['all|user|all|sysop|edit'] = 'Wikipedia fully protected user and user talk pages', ['all|module|all|all|edit'] = 'Wikipedia fully-protected modules', ['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules', ['all|module|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected modules', ['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules', ['all|all|all|sysop|move'] = 'Wikipedia move-protected pages', ['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages', ['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute', ['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism', ['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals', ['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages', ['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages', ['all|template|all|sysop|move'] = 'Wikipedia move-protected templates', ['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages', ['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages', ['all|file|all|all|upload'] = 'Wikipedia upload-protected files', }, -------------------------------------------------------------------------------- -- Expiry category config -------------------------------------------------------------------------------- -- This table configures the expiry category behaviour for each protection -- action. -- * If set to true, setting that action will always categorise the page if -- an expiry parameter is not set. -- * If set to false, setting that action will never categorise the page. -- * If set to nil, the module will categorise the page if: -- 1) an expiry parameter is not set, and -- 2) a reason is provided, and -- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck -- table. expiryCheckActions = { edit = nil, move = false, autoreview = true, upload = false }, reasonsWithoutExpiryCheck = { blp = true, template = true, }, -------------------------------------------------------------------------------- -- Pagetypes -------------------------------------------------------------------------------- -- This table produces the page types available with the ${PAGETYPE} parameter. -- Keys are namespace numbers, or the string "default" for the default value. pagetypes = { [0] = 'article', [6] = 'file', [10] = 'template', [14] = 'category', [828] = 'module', default = 'page' }, -------------------------------------------------------------------------------- -- Strings marking indefinite protection -------------------------------------------------------------------------------- -- This table contains values passed to the expiry parameter that mean the page -- is protected indefinitely. indefStrings = { ['indef'] = true, ['indefinite'] = true, ['indefinitely'] = true, ['infinite'] = true, }, -------------------------------------------------------------------------------- -- Group hierarchy -------------------------------------------------------------------------------- -- This table maps each group to all groups that have a superset of the original -- group's page editing permissions. hierarchy = { sysop = {}, reviewer = {'sysop'}, filemover = {'sysop'}, templateeditor = {'sysop'}, extendedconfirmed = {'sysop'}, autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'}, user = {'autoconfirmed'}, ['*'] = {'user'} }, -------------------------------------------------------------------------------- -- Wrapper templates and their default arguments -------------------------------------------------------------------------------- -- This table contains wrapper templates used with the module, and their -- default arguments. Templates specified in this table should contain the -- following invocation, and no other template content: -- -- {{#invoke:Protection banner|main}} -- -- If other content is desired, it can be added between -- <noinclude>...</noinclude> tags. -- -- When a user calls one of these wrapper templates, they will use the -- default arguments automatically. However, users can override any of the -- arguments. wrappers = { ['Template:Pp'] = {}, ['Template:Pp-extended'] = {'ecp'}, ['Template:Pp-blp'] = {'blp'}, -- we don't need Template:Pp-create ['Template:Pp-dispute'] = {'dispute'}, ['Template:Pp-main-page'] = {'mainpage'}, ['Template:Pp-move'] = {action = 'move', catonly = 'yes'}, ['Template:Pp-move-dispute'] = {'dispute', action = 'move', catonly = 'yes'}, -- we don't need Template:Pp-move-indef ['Template:Pp-move-vandalism'] = {'vandalism', action = 'move', catonly = 'yes'}, ['Template:Pp-office'] = {'office'}, ['Template:Pp-office-dmca'] = {'dmca'}, ['Template:Pp-pc'] = {action = 'autoreview', small = true}, ['Template:Pp-pc1'] = {action = 'autoreview', small = true}, ['Template:Pp-reset'] = {'reset'}, ['Template:Pp-semi-indef'] = {small = true}, ['Template:Pp-sock'] = {'sock'}, ['Template:Pp-template'] = {'template', small = true}, ['Template:Pp-upload'] = {action = 'upload'}, ['Template:Pp-usertalk'] = {'usertalk'}, ['Template:Pp-vandalism'] = {'vandalism'}, }, -------------------------------------------------------------------------------- -- -- MESSAGES -- -------------------------------------------------------------------------------- msg = { -------------------------------------------------------------------------------- -- Intro blurb and intro fragment -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${INTROBLURB} and -- ${INTROFRAGMENT} parameters. If the protection is temporary they use the -- intro-blurb-expiry or intro-fragment-expiry, and if not they use -- intro-blurb-noexpiry or intro-fragment-noexpiry. -- It is possible to use banner parameters in these messages. ['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.', ['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.', ['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},', ['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}', -------------------------------------------------------------------------------- -- Tooltip blurb -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${TOOLTIPBLURB} parameter. -- If the protection is temporary the tooltip-blurb-expiry message is used, and -- if not the tooltip-blurb-noexpiry message is used. -- It is possible to use banner parameters in these messages. ['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.', ['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.', ['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},', ['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', -------------------------------------------------------------------------------- -- Special explanation blurb -------------------------------------------------------------------------------- -- An explanation blurb for pages that cannot be unprotected, e.g. for pages -- in the MediaWiki namespace. -- It is possible to use banner parameters in this message. ['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]].', -------------------------------------------------------------------------------- -- Protection log display values -------------------------------------------------------------------------------- -- These messages determine the display values for the protection log link -- or the pending changes log link produced by the ${PROTECTIONLOG} parameter. -- It is possible to use banner parameters in these messages. ['protection-log-display'] = 'protection log', ['pc-log-display'] = 'pending changes log', -------------------------------------------------------------------------------- -- Current version display values -------------------------------------------------------------------------------- -- These messages determine the display values for the page history link -- or the move log link produced by the ${CURRENTVERSION} parameter. -- It is possible to use banner parameters in these messages. ['current-version-move-display'] = 'current title', ['current-version-edit-display'] = 'current version', -------------------------------------------------------------------------------- -- Talk page -------------------------------------------------------------------------------- -- This message determines the display value of the talk page link produced -- with the ${TALKPAGE} parameter. -- It is possible to use banner parameters in this message. ['talk-page-link-display'] = 'talk page', -------------------------------------------------------------------------------- -- Edit requests -------------------------------------------------------------------------------- -- This message determines the display value of the edit request link produced -- with the ${EDITREQUEST} parameter. -- It is possible to use banner parameters in this message. ['edit-request-display'] = 'submit an edit request', -------------------------------------------------------------------------------- -- Expiry date format -------------------------------------------------------------------------------- -- This is the format for the blurb expiry date. It should be valid input for -- the first parameter of the #time parser function. ['expiry-date-format'] = 'F j, Y "at" H:i e', -------------------------------------------------------------------------------- -- Tracking categories -------------------------------------------------------------------------------- -- These messages determine which tracking categories the module outputs. ['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates', ['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules', -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- These are images that are not defined by their protection action and protection level. ['image-filename-indef'] = 'Full-protection-shackle.svg', ['image-filename-default'] = 'Transparent.gif', -------------------------------------------------------------------------------- -- End messages -------------------------------------------------------------------------------- } -------------------------------------------------------------------------------- -- End configuration -------------------------------------------------------------------------------- } 7b4133071e798dbabff5c4e8628e5537a1d376e3 Module:Message box 828 55 151 2022-02-08T04:38:20Z en>Agent Isai 0 Reverting Scribunto text/plain -- This is a meta-module for producing message box templates, including -- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}. -- Load necessary modules. require('Module:No globals') local getArgs local yesno = require('Module:Yesno') local templatestyles = 'Module:Message box/styles.css' -- Get a language object for formatDate and ucfirst. local lang = mw.language.getContentLanguage() -- Define constants local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {user = 'tmbox', talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <small class='date-container'>''(<span class='date'>%s</span>)''</small>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell if cfg.imageEmptyCellStyle then self.imageEmptyCellStyle = 'border:none;padding:0px;width:1px' end -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage or 'Imbox notice.png', imageSize) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):css('width', '52px') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') :cssText(self.imageEmptyCellStyle or nil) end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) and not self.isSmall then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('small') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):css('width', '52px') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :css('text-align', 'center') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end local function templatestyles(frame, src) return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = templatestyles} } .. 'CONFIG_MODULE' end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) acf3b644ae1301244042d8d85b684ff54438b39e Template:Documentation subpage 10 12 19 2022-02-09T04:09:32Z en>Bsherr 0 semantic emphasis, shortening emphasized phrase wikitext text/x-wiki <includeonly><!-- -->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}} | <!--(this template has been transcluded on a /doc or /{{{override}}} page)--> </includeonly><!-- -->{{#ifeq:{{{doc-notice|show}}} |show | {{Mbox | type = notice | style = margin-bottom:1.0em; | image = [[File:Edit-copy green.svg|40px|alt=|link=]] | text = {{strong|This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]]}} for {{terminate sentence|{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}}}<br />It contains usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} |{{#ifeq:{{SUBJECTSPACE}} |{{ns:User}} |{{lc:{{SUBJECTSPACE}}}} template page |{{#if:{{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}}}}}}}. }} }}<!-- -->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!-- -->{{#if:{{{inhibit|}}} |<!--(don't categorize)--> | <includeonly><!-- -->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}} | [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | [[Category:Documentation subpages without corresponding pages]] }}<!-- --></includeonly> }}<!-- (completing initial #ifeq: at start of template:) --><includeonly> | <!--(this template has not been transcluded on a /doc or /{{{override}}} page)--> }}<!-- --></includeonly><noinclude>{{Documentation}}</noinclude> 932915be87123dcf74687ffca846a3130a6a52af Template:Post-nominals/AUS 10 198 550 2022-02-14T04:18:17Z en>Paine Ellsworth 0 per edit request at [[Template talk:Post-nominals#Template-protected edit request on 13 February 2022]] - include honorific wikitext text/x-wiki {{#switch: {{{1}}} | AAM = [[Australian Antarctic Medal|AAM]] | AC = [[Companion of the Order of Australia|AC]] | ACm = [[Companion of the Order of Australia|AC (Mil)]] | ACh = [[Honorary Companion of the Order of Australia|AC]] | AD = [[Dame of the Order of Australia|AD]] | ADh = [[Honorary Dame of the Order of Australia|AD]] | AFSM = [[Australian Fire Service Medal|AFSM]] | AK = [[Knight of the Order of Australia|AK]] | AKh = [[Honorary Knight of the Order of Australia|AK]] | AM = [[Member of the Order of Australia|AM]] | AMg = [[Member of the Order of Australia|AM (Gen)]] | AMm = [[Member of the Order of Australia|AM (Mil)]] | AMh = [[Honorary Member of the Order of Australia|AM]] | AO = [[Officer of the Order of Australia|AO]] | AOg = [[Officer of the Order of Australia|AO (Gen)]] | AOm = [[Officer of the Order of Australia|AO (Mil)]] | AOh = [[Honorary Officer of the Order of Australia|AO]] | APM = [[Australian Police Medal|APM]] | ASM = [[Ambulance Service Medal (Australia)|ASM]] | BM = [[Bravery Medal (Australia)|BM]] | CD = [[Canadian Forces Decoration|CD]] | C.D. = [[Canadian Forces Decoration|C.D.]] | CF = [[Churchill Fellow|CF]] | CSC = [[Conspicuous Service Cross (Australia)|CSC]] | CSC1 = [[Conspicuous Service Cross (Australia)|CSC]] & [[Medal bar|Bar]] | CSM = [[Conspicuous Service Medal|CSM]] | CV = [[Cross of Valour (Australia)|CV]] | DSC = [[Distinguished Service Cross (Australia)|DSC]] | DSCa = [[Distinguished Service Cross (Australia)|DSC]] | DSCuk = [[Distinguished Service Cross (United Kingdom)|DSC]] | DSC1 = [[Distinguished Service Cross (United Kingdom)|DSC]] & [[Medal bar|Bar]] | DSC2 = [[Distinguished Service Cross (United Kingdom)|DSC]] & [[Medal bar|Two Bars]] | DSM = [[Distinguished Service Medal (Australia)|DSM]] | DSMuk = [[Distinguished Service Medal (United Kingdom)|DSM]] | ESM = [[Emergency Services Medal (Australia)|ESM]] | MG = [[Medal for Gallantry|MG]] | MP = [[Member of parliament#Australia|MP]] | NSC = [[Nursing Service Cross (Australia)|NSC]] | OAM = [[Medal of the Order of Australia|OAM]] | OAMg = [[Medal of the Order of Australia|OAM (Gen)]] | OAMm = [[Medal of the Order of Australia|OAM (Mil)]] | PSM = [[Public Service Medal (Australia)|PSM]] | SoC = [[Star of Courage (Australia)|SC]] | SG = [[Star of Gallantry|SG]] | VC = [[Victoria Cross for Australia|VC]] | ADC = [[Aide de Camp|ADC]] | ADC(P) = [[Personal Aide-de-Camp|ADC(P)]] | AE = [[Air Efficiency Award|AE]] | AFC = [[Air Force Cross (United Kingdom)|AFC]] | AFC1 = [[Air Force Cross (United Kingdom)|AFC]] & [[Medal bar|Bar]] | AFM = [[Air Force Medal|AFM]] | ARRC = [[Royal Red Cross|ARRC]] | AsstChStJ = [[Assistant Chaplin of The Most Venerable Order of the Hospital of Saint John of Jerusalem|AsstChStJ]] | BEM = [[British Empire Medal|BEM]] | Bart = [[Baronet|Bart]] | Bt = [[Baronet|Bt]] | Btss = [[Baronet|Btss]] | CB = [[Companion of the Order of the Bath|CB]] | CBE = [[Commander of the Order of the British Empire|CBE]] | CBEh = [[Commander of the Order of the British Empire|CBE]] | CChem = [[Chartered Chemist|CChem]] | CGM = [[Conspicuous Gallantry Medal|CGM]] | CH = [[Companion of the Order of the Companions of Honour|CH]] | CIE = [[Companion of the Order of the Indian Empire|CIE]] | CMG = [[Companion of the Order of St Michael and St George|CMG]] | CNZM = [[Companion of the New Zealand Order of Merit|CNZM]] | CPM = [[Colonial Police Medal|CPM]] | CSI = [[Companion of the Order of the Star of India|CSI]] | CStJ = [[Commander of the Most Venerable Order of the Hospital of Saint John of Jerusalem|CStJ]] | ChStJ = [[Chaplain of the Most Venerable Order of the Hospital of Saint John of Jerusalem|ChStJ]] | CVO = [[Commander of the Royal Victorian Order|CVO]] | DBE = [[Dame Commander of the Order of the British Empire|DBE]] | DCB = [[Dame Commander of the Order of the Bath|DCB]] | DCIE = [[Dame Commander of the Order of the Indian Empire|DCIE]] | DCM = [[Distinguished Conduct Medal|DCM]] | DCM1 = [[Distinguished Conduct Medal|DCM]] & [[Medal bar|Bar]] | DCMG = [[Dame Commander of the Order of St Michael and St George|DCMG]] | DCVO = [[Dame Commander of the Royal Victorian Order|DCVO]] | DFC = [[Distinguished Flying Cross (United Kingdom)|DFC]] | DFC1 = [[Distinguished Flying Cross (United Kingdom)|DFC]] & [[Medal bar|Bar]] | DFC2 = [[Distinguished Flying Cross (United Kingdom)|DFC]] & [[Medal bar|Two Bars]] | DFM = [[Distinguished Flying Medal|DFM]] | DFM1 = [[Distinguished Flying Medal|DFM]] & [[Medal bar|Bar]] | DFM2 = [[Distinguished Flying Medal|DFM]] & [[Medal bar|Two Bars]] | DL = [[Deputy Lieutenant|DL]] | DSO = [[Companion of the Distinguished Service Order|DSO]] | DSO1 = [[Companion of the Distinguished Service Order|DSO]] & [[Medal Bar|Bar]] | DSO2 = [[Companion of the Distinguished Service Order|DSO]] & [[Medal bar|Two Bars]] | DStJ = [[Dame of Justice of the Most Venerable Order of the Hospital of Saint John of Jerusalem|DStJ]] | DStJg = [[Dame of Grace of the Most Venerable Order of the Hospital of Saint John of Jerusalem|DStJ]] | ED = [[Efficiency Decoration|ED]] | ERD = [[Emergency Reserve Decoration|ERD]] | EsqStJ = [[Esquire of the Most Venerable Order of the Hospital of Saint John of Jerusalem|EsqStJ]] | FAA = [[Fellow of the Australian Academy of Science|FAA]] | FAAL = [[Australian Academy of Law#Fellows|FAAL]] | FACE = [[Fellow of the Australian College of Educators|FACE]] | FAHA = [[Fellow of the Australian Academy of the Humanities|FAHA]] | FAHMS = [[Fellow of the Australian Academy of Health and Medical Sciences|FAHMS]] | FAICD = [[Fellow of the Australian Institute of Company Directors|FAICD]] | FASSA = [[Fellow of the Academy of the Social Sciences in Australia|FASSA]] | FMedSci= [[Fellow of the Academy of Medical Sciences|FMedSci]] | FRACI = [[Fellow of the Royal Australian Chemical Institute|FRACI]] | FRACP = [[Fellow of the Royal Australasian College of Physicians|FRACP]] | FRACS = [[Fellow of the Royal Australasian College of Surgeons|FRACS]] | FRAeS = [[Fellow of the Royal Aeronautical Society|FRAeS]] | FRCP = [[Fellow of the Royal College of Physicians|FRCP]] | FRCPE = [[Fellow of the Royal College of Physicians of Edinburgh|FRCPE]] | FRCS = [[Fellow of the Royal College of Surgeons|FRCS]] | FRMS = [[Royal Microscopical Society|FRMS]] | FRS = [[Fellow of the Royal Society|FRS]] | FRSA = [[Fellow of the Royal Society of Arts|FRSA]] | FRSN = [[Fellow of the Royal Society of New South Wales|FRSN]] | FRSNZ = [[Fellow of the Royal Society of New Zealand|FRSNZ]] | FRZS = [[Royal Zoological Society of New South Wales|FRZS]] | FTSE = [[Fellow of the Australian Academy of Technological Sciences and Engineering|FTSE]] | GBE = [[Knight Grand Cross of the Order of the British Empire|GBE]] | GBEf = [[Dame Grand Cross of the Order of the British Empire|GBE]] | GC = [[George Cross|GC]] | GCB = [[Knight Grand Cross of the Order of the Bath|GCB]] | GCBf = [[Dame Grand Cross of the Order of the Bath|GCB]] | GCIE = [[Knight Grand Cross of the Order of the Indian Empire|GCIE]] | GCIEf = [[Dame Grand Cross of the Order of the Indian Empire|GCIE]] | GCMG = [[Knight Grand Cross of the Order of St Michael and St George|GCMG]] | GCMGf = [[Dame Grand Cross of the Order of St Michael and St George|GCMG]] | GCSI = [[Knight Grand Cross of the Order of the Star of India|GCSI]] | GCSIf = [[Dame Grand Cross of the Order of the Star of India|GCSI]] | GCStJ = [[Bailiff Grand Cross of the Most Venerable Order of the Hospital of Saint John of Jerusalem|GCStJ]] | GCStJf = [[Dame Grand Cross of the Most Venerable Order of the Hospital of Saint John of Jerusalem|GCStJ]] | GCVO = [[Knight Grand Cross of the Royal Victorian Order|GCVO]] | GCVOf = [[Dame Grand Cross of the Royal Victorian Order|GCVO]] | GM = [[George Medal|GM]] | GM1 = [[George Medal|GM]] & [[Medal bar|Bar]] | ISO = [[Imperial Service Order|ISO]] | JP = [[Justice of the peace#Australia|JP]] | KBE = [[Knight Commander of the Order of the British Empire|KBE]] | KC = [[King's Counsel|KC]] | KCB = [[Knight Commander of the Order of the Bath|KCB]] | KCIE = [[Knight Commander of the Order of the Indian Empire|KCIE]] | KCMG = [[Knight Commander of the Order of St Michael and St George|KCMG]] | KCVO = [[Knight Commander of the Royal Victorian Order|KCVO]] | KG = [[Knight of the Order of the Garter|KG]] | KP = [[Knight of the Order of Saint Patrick|KP]] | KCSI = [[Knight Commander of the Order of the Star of India|KCSI]] | DCSI = [[Dame Commander of the Order of the Star of India|DCSI]] | KStJ = [[Knight of Justice of the Most Venerable Order of the Hospital of Saint John of Jerusalem|KStJ]] | KStJg = [[Knight of Grace of the Most Venerable Order of the Hospital of Saint John of Jerusalem|KStJ]] | KT = [[Knight of the Order of the Thistle|KT]] | LG = [[Lady Companion of the Order of the Garter|LG]] | LT = [[Lady Companion of the Order of the Thistle|LT]] | LVO = [[Lieutenant of the Royal Victorian Order|LVO]] | MBE = [[Member of the Order of the British Empire|MBE]] | MC = [[Military Cross|MC]] | MC1 = [[Military Cross|MC]] & [[Medal bar|Bar]] | MC2 = [[Military Cross|MC]] & [[Medal bar|Two Bars]] | MM = [[Military Medal|MM]] | MM1 = [[Military Medal|MM]] & [[Medal bar|Bar]] | MM2 = [[Military Medal|MM]] & [[Medal bar|Two Bars]] | MM3 = [[Military Medal|MM]] & [[Medal bar|Three Bars]] | MVO = [[Member of the Royal Victorian Order|MVO]] | OBE = [[Officer of the Order of the British Empire|OBE]] | OM = [[Member of the Order of Merit|OM]] | OStJ = [[Officer of the Most Venerable Order of the Hospital of Saint John of Jerusalem|OStJ]] | PC = [[Her Majesty's Most Honourable Privy Council|PC]] | SC = [[Senior Counsel|SC]] | QC = [[Queen's Counsel|QC]] | QGM = [[Queen's Gallantry Medal|QGM]] | QFSM = [[Queen's Fire Service Medal for Gallantry|QFSM]] | QPM = [[Queen's Police Medal for Gallantry|QPM]] | QFSMd = [[Queen's Fire Service Medal for Distinguished Service|QFSM]] | QPMd = [[Queen's Police Medal for Distinguished Service|QPM]] | RAN = [[Royal Australian Navy|RAN]] | RAAF = [[Royal Australian Air Force|RAAF]] | RANR = [[Royal Australian Naval Reserve|RANR]] | RFD = [[Reserve Force Decoration|RFD]] | RRC = [[Royal Red Cross|RRC]] | RVM = [[Royal Victorian Medal|RVM]] | SBStJ = [[Serving Brother of the Most Venerable Order of the Hospital of Saint John of Jerusalem|SBStJ]] | SSStJ = [[Serving Sister of the Most Venerable Order of the Hospital of Saint John of Jerusalem|SSStJ]] | Sub-ChStJ = [[Sub-Chaplain of the Most Venerable Order of the Hospital of Saint John of Jerusalem|Sub-ChStJ]] | TD = [[Territorial Decoration|TD]] | VCi = [[Victoria Cross|VC]] | VD = [[Colonial Auxiliary Forces Officers' Decoration|VD]] | * = [[Medal bar|*]] | SSI = [[Star of the Solomon Islands|SSI]] | GCL = [[Grand Companion of the Order of Logohu|GCL]] | QSO = [[Companion of the Queen's Service Order|QSO]] | CFA = [[Chartered Financial Analyst|CFA]] | C.F.A. = [[Chartered Financial Analyst|C.F.A.]] | AAM, = [[Australian Antarctic Medal|AAM]], | AC, = [[Companion of the Order of Australia|AC]], | ACh, = [[Honorary Companion of the Order of Australia|AC]], | AD, = [[Dame of the Order of Australia|AD]], | ADh, = [[Honorary Dame of the Order of Australia|AD]], | AFSM, = [[Australian Fire Service Medal|AFSM]], | AK, = [[Knight of the Order of Australia|AK]], | AKh, = [[Honorary Knight of the Order of Australia|AK]], | AM, = [[Member of the Order of Australia|AM]], | AMh, = [[Honorary Member of the Order of Australia|AM]], | AO, = [[Officer of the Order of Australia|AO]], | AOh, = [[Honorary Officer of the Order of Australia|AO]], | APM, = [[Australian Police Medal|APM]], | ASM, = [[Ambulance Service Medal (Australia)|ASM]], | BM, = [[Bravery Medal (Australia)|BM]], | CSC, = [[Conspicuous Service Cross (Australia)|CSC]], | CSM, = [[Conspicuous Service Medal|CSM]], | CV, = [[Cross of Valour (Australia)|CV]], | DSC, = [[Distinguished Service Cross (Australia)|DSC]], | DSCa, = [[Distinguished Service Cross (Australia)|DSC]], | DSCuk, = [[Distinguished Service Cross (United Kingdom)|DSC]], | DSC1, = [[Distinguished Service Cross and Bar (United Kingdom)|DSC]] & [[Medal bar|Bar]], | DSC2, = [[Distinguished Service Cross and two Bars (United Kingdom)|DSC]] & [[Medal bar|Two Bars]], | DSM, = [[Distinguished Service Medal (Australia)|DSM]], | DSMuk, = [[Distinguished Service Medal (United Kingdom)|DSM]], | ESM, = [[Emergency Services Medal (Australia)|ESM]], | MG, = [[Medal for Gallantry|MG]], | MP, = [[Member of Parliament|MP]], | NSC, = [[Nursing Service Cross (Australia)|NSC]], | OAM, = [[Medal of the Order of Australia|OAM]], | PSM, = [[Public Service Medal (Australia)|PSM]], | SC, = [[Star of Courage (Australia)|SC]], | SG, = [[Star of Gallantry|SG]], | VC, = [[Victoria Cross for Australia|VC]], | ADC, = [[Aide de Camp|ADC]], | ADC(P),= [[Personal Aide-de-Camp|ADC(P)]], | AE, = [[Air Efficiency Award|AE]], | AFC, = [[Air Force Cross (United Kingdom)|AFC]], | AFC1, = [[Air Force Cross (United Kingdom)|AFC]] & [[Medal bar|Bar]], | AFM, = [[Air Force Medal|AFM]], | ARRC, = [[Royal Red Cross|ARRC]], | AsstChStJ, = [[Assistant Chaplin of The Most Venerable Order of the Hospital of Saint John of Jerusalem|AsstChStJ]], | BEM, = [[British Empire Medal|BEM]], | Bart, = [[Baronet|Bart]], | Bt, = [[Baronet|Bt]], | Btss, = [[Baronet|Btss]], | CB, = [[Companion of the Order of the Bath|CB]], | CBE, = [[Commander of the Order of the British Empire|CBE]], | CBEh, = [[Commander of the Order of the British Empire|CBE]], | CGM, = [[Conspicuous Gallantry Medal|CGM]], | CH, = [[Companion of the Order of the Companions of Honour|CH]], | CIE, = [[Companion of the Order of the Indian Empire|CIE]], | CMG, = [[Companion of the Order of St Michael and St George|CMG]], | CPM, = [[Colonial Police Medal|CPM]], | CStJ, = [[Commander of the Most Venerable Order of the Hospital of Saint John of Jerusalem|CStJ]], | ChStJ, = [[Chaplain of the Most Venerable Order of the Hospital of Saint John of Jerusalem|ChStJ]], | CVO, = [[Commander of the Royal Victorian Order|CVO]], | DBE, = [[Dame Commander of the Order of the British Empire|DBE]], | DCB, = [[Dame Commander of the Order of the Bath|DCB]], | DCIE, = [[Dame Commander of the Order of the Indian Empire|DCIE]], | DCM, = [[Distinguished Conduct Medal|DCM]], | DCMG, = [[Dame Commander of the Order of St Michael and St George|DCMG]], | DCVO, = [[Dame Commander of the Royal Victorian Order|DCVO]], | DFC, = [[Distinguished Flying Cross (United Kingdom)|DFC]], | DFC1, = [[Distinguished Flying Cross (United Kingdom)|DFC]] & [[Medal bar|Bar]], | DFC2, = [[Distinguished Flying Cross (United Kingdom)|DFC]] & [[Medal bar|Two Bars]], | DFM, = [[Distinguished Flying Medal|DFM]], | DFM1, = [[Distinguished Flying Medal|DFM]] & [[Medal bar|Bar]], | DFM2, = [[Distinguished Flying Medal|DFM]] & [[Medal bar|Two Bars]], | DL, = [[Deputy Lieutenant|DL]], | DSO, = [[Companion of the Distinguished Service Order|DSO]], | DSO1, = [[Companion of the Distinguished Service Order|DSO]] & [[Medal bar|Bar]], | DSO2, = [[Companion of the Distinguished Service Order|DSO]] & [[Medal bar|Two Bars]], | DStJ, = [[Dame of Justice of the Most Venerable Order of the Hospital of Saint John of Jerusalem|DStJ]], | DStJg, = [[Dame of Grace of the Most Venerable Order of the Hospital of Saint John of Jerusalem|DStJ]], | ED, = [[Efficiency Decoration|ED]], | ERD, = [[Emergency Reserve Decoration|ERD]], | EsqStJ,= [[Esquire of the Most Venerable Order of the Hospital of Saint John of Jerusalem|EsqStJ]], | FAA, = [[Fellow of the Australian Academy of Science|FAA]], | FAHMS, = [[Fellow of the Australian Academy of Health and Medical Sciences|FAHMS]], | FAICD, = [[Fellow of the Australian Institute of Company Directors|FAICD]], | FRACP, = [[Fellow of the Royal Australasian College of Physicians|FRACP]], | FRCP, = [[Fellow of the Royal College of Physicians|FRCP]], | FRCPE, = [[Fellow of the Royal College of Physicians of Edinburgh|FRCPE]], | FRS, = [[Fellow of the Royal Society|FRS]], | FRSN, = [[Fellow of the Royal Society of New South Wales|FRSN]], | FRSNZ, = [[Fellow of the Royal Society of New Zealand|FRSNZ]], | FTSE, = [[Fellow of the Australian Academy of Technological Sciences and Engineering|FTSE]], | GBE, = [[Knight Grand Cross of the Order of the British Empire|GBE]], | GBEf, = [[Dame Grand Cross of the Order of the British Empire|GBE]], | GC, = [[George Cross|GC]], | GCB, = [[Knight Grand Cross of the Order of the Bath|GCB]], | GCBf, = [[Dame Grand Cross of the Order of the Bath|GCB]], | GCIE, = [[Knight Grand Cross of the Order of the Indian Empire|GCIE]], | GCIEf, = [[Dame Grand Cross of the Order of the Indian Empire|GCIE]], | GCMG, = [[Knight Grand Cross of the Order of St Michael and St George|GCMG]], | GCMGf, = [[Dame Grand Cross of the Order of St Michael and St George|GCMG]], | GCStJ, = [[Bailiff Grand Cross of the Most Venerable Order of the Hospital of Saint John of Jerusalem|GCStJ]], | GCStJf,= [[Dame Grand Cross of the Most Venerable Order of the Hospital of Saint John of Jerusalem|GCStJ]], | GCVO, = [[Knight Grand Cross of the Royal Victorian Order|GCVO]], | GCVOf, = [[Dame Grand Cross of the Royal Victorian Order|GCVO]], | GM, = [[George Medal|GM]], | JP, = [[Justice of the Peace|JP]], | KBE, = [[Knight Commander of the Order of the British Empire|KBE]], | KC, = [[King's Counsel|KC]], | KCB, = [[Knight Commander of the Order of the Bath|KCB]], | KCIE, = [[Knight Commander of the Order of the Indian Empire|KCIE]], | KCMG, = [[Knight Commander of the Order of St Michael and St George|KCMG]], | KCVO, = [[Knight Commander of the Royal Victorian Order|KCVO]], | KG, = [[Knight of the Order of the Garter|KG]], | KP, = [[Knight of the Order of Saint Patrick|KP]], | KStJ, = [[Knight of Justice of the Most Venerable Order of the Hospital of Saint John of Jerusalem|KStJ]], | KStJg, = [[Knight of Grace of the Most Venerable Order of the Hospital of Saint John of Jerusalem|KStJ]], | KT, = [[Knight of the Order of the Thistle|KT]], | LG, = [[Lady Companion of the Order of the Garter|LG]], | LT, = [[Lady Companion of the Order of the Thistle|LT]], | LVO, = [[Lieutenant of the Royal Victorian Order|LVO]], | MBE, = [[Member of the Order of the British Empire|MBE]], | MC, = [[Military Cross|MC]], | MM, = [[Military Medal|MM]], | MVO, = [[Member of the Royal Victorian Order|MVO]], | OBE, = [[Officer of the Order of the British Empire|OBE]], | OM, = [[Member of the Order of Merit|OM]], | OStJ, = [[Officer of the Most Venerable Order of the Hospital of Saint John of Jerusalem|OStJ]], | PC, = [[Her Majesty's Most Honourable Privy Council|PC]], | QC, = [[Queen's Counsel|QC]], | QGM, = [[Queen's Gallantry Medal|QGM]], | QFSM, = [[Queen's Fire Service Medal for Gallantry|QFSM]], | QPM, = [[Queen's Police Medal for Gallantry|QPM]], | QFSMd, = [[Queen's Fire Service Medal for Distinguished Service|QFSM]], | QPMd, = [[Queen's Police Medal for Distinguished Service|QPM]], | RAN = [[Royal Australian Navy|RAN]] | RANR = [[Royal Australian Naval Reserve|RANR]] | RD, = [[Decoration for Officers of the Royal Naval Reserve|RD]], | RFD, = [[Reserve Force Decoration|RFD]], | RRC, = [[Royal Red Cross|RRC]], | RVM, = [[Royal Victorian Medal|RVM]], | SBStJ, = [[Serving Brother of the Most Venerable Order of the Hospital of Saint John of Jerusalem|SBStJ]], | SSStJ, = [[Serving Sister of the Most Venerable Order of the Hospital of Saint John of Jerusalem|SSStJ]], | Sub-ChStJ, = [[Sub-Chaplain of the Most Venerable Order of the Hospital of Saint John of Jerusalem|Sub-ChStJ]], | TD, = [[Territorial Decoration|TD]], | VCi, = [[Victoria Cross|VC]], | VD, = [[Volunteer Officers' Decoration|VD]], | *, = [[Medal bar|*]], | SSI, = [[Star of the Solomon Islands|SSI]], | GCL, = [[Grand Companion of the Order of Logohu|GCL]], | QSO, = [[Companion of the Queen's Service Order|QSO]], | OLY, = [[Competitor at the Olympic Games|OLY]] }}<noinclude> {{documentation}} </noinclude> d20d155d6094556b283947b6a9907cf304c3b9b9 Module:Check for unknown parameters 828 41 77 2022-02-21T05:24:13Z en>BusterD 0 Changed protection settings for "[[Module:Check for unknown parameters]]": [[WP:High-risk templates|Highly visible template]]; requested at [[WP:RfPP]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) Scribunto text/plain -- This module may be used to compare the arguments passed to the parent -- with a list of arguments, returning a specified result if an argument is -- not on the list local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end local function clean(text) -- Return text cleaned for display and truncated if too long. -- Strip markers are replaced with dummy text representing the original wikitext. local pos, truncated local function truncate(text) if truncated then return '' end if mw.ustring.len(text) > 25 then truncated = true text = mw.ustring.sub(text, 1, 25) .. '...' end return mw.text.nowiki(text) end local parts = {} for before, tag, remainder in text:gmatch('([^\127]*)\127[^\127]*%-(%l+)%-[^\127]*\127()') do pos = remainder table.insert(parts, truncate(before) .. '&lt;' .. tag .. '&gt;...&lt;/' .. tag .. '&gt;') end table.insert(parts, truncate(text:sub(pos or 1))) return table.concat(parts) end function p._check(args, pargs) if type(args) ~= "table" or type(pargs) ~= "table" then -- TODO: error handling return end -- create the list of known args, regular expressions, and the return string local knownargs = {} local regexps = {} for k, v in pairs(args) do if type(k) == 'number' then v = trim(v) knownargs[v] = 1 elseif k:find('^regexp[1-9][0-9]*$') then table.insert(regexps, '^' .. v .. '$') end end -- loop over the parent args, and make sure they are on the list local ignoreblank = isnotempty(args['ignoreblank']) local showblankpos = isnotempty(args['showblankpositional']) local values = {} for k, v in pairs(pargs) do if type(k) == 'string' and knownargs[k] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(k, regexp) then knownflag = true break end end if not knownflag and ( not ignoreblank or isnotempty(v) ) then table.insert(values, clean(k)) end elseif type(k) == 'number' and knownargs[tostring(k)] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(tostring(k), regexp) then knownflag = true break end end if not knownflag and ( showblankpos or isnotempty(v) ) then table.insert(values, k .. ' = ' .. clean(v)) end end end -- add results to the output tables local res = {} if #values > 0 then local unknown_text = args['unknown'] or 'Found _VALUE_, ' if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then local preview_text = args['preview'] if isnotempty(preview_text) then preview_text = require('Module:If preview')._warning({preview_text}) elseif preview == nil then preview_text = unknown_text end unknown_text = preview_text end for _, v in pairs(values) do -- Fix odd bug for | = which gets stripped to the empty string and -- breaks category links if v == '' then v = ' ' end -- avoid error with v = 'example%2' ("invalid capture index") local r = unknown_text:gsub('_VALUE_', {_VALUE_ = v}) table.insert(res, r) end end return table.concat(res) end function p.check(frame) local args = frame.args local pargs = frame:getParent().args return p._check(args, pargs) end return p 93db6d115d4328d2a5148bb42959105e367b663e Template:Infobox legislation/images 10 19 33 2022-02-21T10:50:45Z en>Glide08 0 wikitext text/x-wiki <includeonly>{{#switch:{{{image|}}} <!--AUSTRALIA--> |[[Parliament of Australia]] = Australian Coat of Arms.png |[[Australian Capital Territory Legislative Assembly]] |[[Australian Capital Territory Legislative Assembly|ACT Legislative Assembly]] = Coat of Arms of the Australian Capital Territory.svg |[[Parliament of New South Wales]] = Coat of Arms of New South Wales.svg |[[Northern Territory Parliament]] = Northern Territory Legislative Assembly.jpg |[[Queensland Legislative Assembly]] = Coat of Arms of Queensland.svg |[[Parliament of South Australia]] = Adelaide parliament house.JPG |[[Parliament of Tasmania]] = Tasmania Coat of Arms.svg |[[Parliament of Victoria]] = Victoria Parliament House Melbourne.jpg |[[Parliament of Western Australia]] = Western Australian Coat of Arms.svg <!--BERMUDA--> |[[Parliament of Bermuda]] = Coat of arms of Bermuda.svg <!--CANADA--> |[[Parliament of Canada]] = Parliament-Ottawa.jpg |[[Legislative Assembly of Alberta]] = 2011 Alberta Legislature Building 03.jpg |[[Legislative Assembly of British Columbia]] = BC Legislature Buildings.jpg |[[Legislative Assembly of Manitoba]] = Parliamentwinnipeg manitoba.jpg |[[Legislative Assembly of New Brunswick]] = Legislative Assembly of New Brunswick.jpg |[[Newfoundland and Labrador House of Assembly]] = Colonialbuilding.jpg |[[Legislative Assembly of the Northwest Territories]] = Coat of arms of Northwest Territories.svg |[[Nova Scotia House of Assembly]] = Coat of arms of Nova Scotia.svg |[[Legislative Assembly of Nunavut]] = Leg Building Iqaluit 2000-08-27.jpg |[[Legislative Assembly of Ontario]] = Coat of Arms of Ontario.svg |[[Legislative Assembly of Prince Edward Island]] = 282 - Birthplace of Canada Charlottetown PEI.JPG |[[National Assembly of Quebec]] |[[National Assembly of Quebec|L'Assemblée Nationale du Québec]] = Armoiries du Québec.svg |[[Legislative Assembly of Saskatchewan]] = Sask Legislative Bldg.jpg |[[Yukon Legislative Assembly]] = Coat of arms of Yukon.svg <!--GIBRALTAR--> |[[Parliament of Gibraltar]] = Coat of arms of Gibraltar1.svg |[[Gibraltar Legislative Council]] = Coat of arms of Gibraltar1.svg <!--INDIA--> |[[Parliament of India]] = Emblem of India.svg <!--IRELAND--> |[[Oireachtas]] = Coat of arms of Ireland.svg <!--ISRAEL--> |[[Knesset]] = Israel Museum, Jerusalem P1110159 (5888320710).jpg <!--JAPAN--> |[[National Diet]] = Go-shichi no kiri crest 2.svg <!--KOREA--> |[[National Assembly of South Korea]] = National Assembly Building of the Republic of Korea.png <!--MALAYSIA--> |[[Parliament of Malaysia]] = Coat of arms of Malaysia.svg |[[Johor State Legislative Assembly]] = Sultan Ismail Building.JPG |[[Kedah State Legislative Assembly]] = Coat of arms of Kedah.svg |[[Kelantan State Legislative Assembly]] = Coat of arms of Kelantan.svg |[[Malacca State Legislative Assembly]] = Seri Negeri Blok Laksamana.JPG |[[Negeri Sembilan State Legislative Assembly]] = Coat of arms of Negeri Sembilan.svg |[[Pahang State Legislative Assembly]] = Coat of arms of Pahang.svg |[[Penang State Legislative Assembly]] = Dewan Undangan Negeri Penang Dec 2006 003.jpg |[[Perak State Legislative Assembly]] = Coat of arms of Perak.svg |[[Perlis State Legislative Assembly]] = Coat of arms of Perlis.svg |[[Sabah State Legislative Assembly]] = KotaKinabalu Sabah DewanUndanganNegeriSabah-01.jpg |[[Sarawak State Legislative Assembly]] = Sarawak state assembly building.jpg |[[Selangor State Legislative Assembly]] = Sultan Salahuddin Abdul Aziz Shah building.jpg |[[Terengganu State Legislative Assembly]] = Coat of arms of Terengganu.svg <!--NEW ZEALAND--> |[[New Zealand Parliament]] |[[Parliament of New Zealand]] = Coat of arms of New Zealand.svg <!--PHILIPPINES--> |[[National Assembly of the Philippines]] = Coat of arms of the Commonwealth of the Philippines.svg |[[Philippine Legislature]] = Coat of Arms Philippine Islands (1905–1936).svg |[[Commonwealth Congress]] = Coat of arms of the Commonwealth of the Philippines.svg |[[Batasang Pambansa]] = |[[Congress of the Philippines]] = Coat of Arms of the Philippines.svg |[[President of the Philippines]] = Seal of the President of the Philippines.svg <!--SINGAPORE--> |[[Parliament of Singapore]] = {{#ifexpr:{{gsd|day={{#time:j|{{{date|}}}}}|month={{#time:n|{{{date|}}}}}|year={{#time:Y|{{{date|}}}}} }}<730003|Old Parliament House 4, Singapore, Jan 06.JPG|Parliament House Singapore.jpg}} <!--SOUTH AFRICA--> |[[Parliament of South Africa]] = Coat of arms of South Africa (heraldic).svg |[[South African Parliament]] = Coat of arms of South Africa (heraldic).svg |[[Parliament of South Africa|Parliament&nbsp;of&nbsp;South&nbsp;Africa]] = Coat of arms of South Africa (heraldic).svg |[[Volksraad]] = Coat of Arms of the South African Republic.png |[[Eastern Cape Provincial Legislature]] = <!-- None --> |[[KwaZulu-Natal Legislature]] = KwaZulu-Natal Parliament building, Pietermaritzburg, South Africa.jpg |[[Western Cape Provincial Legislature]] |[[Western Cape Provincial Parliament]] = Western Cape provincial building.jpg <!--SOUTH AFRICA VARIANTS--> |[[Volksraad|Transvaal Volksraad]] = Coat of Arms of the South African Republic.png |[[Parliament of South Africa#1910|Parliament of South Africa]] = Coat of arms of South Africa (1910–1930).svg |[[Parliament of South Africa#1930|Parliament of South Africa]] = Coat of arms of South Africa (1930–1932).svg |[[Parliament of South Africa#1932|Parliament of South Africa]] = Coat of arms of South Africa (1932–2000).svg |[[Parliament of South Africa#1961|Parliament of South Africa]] = Coat of arms of South Africa (1932–2000).svg |[[Parliament of South Africa#1984|Parliament of South Africa]] = Coat of arms of South Africa (1932–2000).svg |[[Parliament of South Africa#1910|Parliament&nbsp;of&nbsp;South&nbsp;Africa]] = Coat of arms of South Africa (1910–1930).svg |[[Parliament of South Africa#1930|Parliament&nbsp;of&nbsp;South&nbsp;Africa]] = Coat of arms of South Africa (1930–1932).svg |[[Parliament of South Africa#1932|Parliament&nbsp;of&nbsp;South&nbsp;Africa]] = Coat of arms of South Africa (1932–2000).svg |[[Parliament of South Africa#1961|Parliament&nbsp;of&nbsp;South&nbsp;Africa]] = Coat of arms of South Africa (1932–2000).svg |[[Parliament of South Africa#1984|Parliament&nbsp;of&nbsp;South&nbsp;Africa]] = Coat of arms of South Africa (1932–2000).svg |[[South African Parliament#1910|South African Parliament]] = Coat of arms of South Africa (1910–1930).svg |[[South African Parliament#1930|South African Parliament]] = Coat of arms of South Africa (1930–1932).svg |[[South African Parliament#1932|South African Parliament]] = Coat of arms of South Africa (1932–2000).svg |[[South African Parliament#1961|South African Parliament]] = Coat of arms of South Africa (1932–2000).svg |[[South African Parliament#1984|South African Parliament]] = Coat of arms of South Africa (1932–2000).svg <!--STRAITS SETTLEMENTS--> |[[List of British Governors of the Straits Settlements|Governor of the Straits Settlements]] with the advice and consent of the [[Legislative Council of the Straits Settlements|Legislative Council]] = Coat of arms of the Straits Settlements.svg <!--UKRAINE--> |[[Verkhovna Rada]] = Будівля по вулиці Грушевського, 5.jpg <!--UNITED KINGDOM--> |[[Parliament of the United Kingdom]] = Royal Coat of Arms of the United Kingdom (HM Government).svg |[[Northern Ireland Assembly]] = Coat of Arms of Northern Ireland.svg |[[Parliament of Northern Ireland]] = Coat of Arms of Northern Ireland.svg |[[Scottish Parliament]] = Royal Coat of Arms of the United Kingdom (Scotland).svg |[[National Assembly for Wales]] = Royal Badge of Wales (2008).svg <!--USA--> |[[Government of the United States of America|Government of the United States of America]] = Great Seal of the United States (obverse).svg |[[United States Congress]] |[[Congress of the United States]] |[[Congress of the United States|US Congress]] |[[Congress of the United States|U.S. Congress]] = US Congressional Seal.svg |[[Alabama Legislature]] = Seal of Alabama.svg |[[Alaska Legislature]] = State Seal of Alaska.svg |[[Arizona Legislature]] = Arizonastateseal.jpg |[[Arkansas General Assembly]] = Seal of Arkansas.svg |[[California State Legislature]] = Seal of California.svg |[[Colorado General Assembly]] = Seal of Colorado.svg |[[Connecticut General Assembly]] = Connecticut State Capitol, Hartford.jpg |[[Michigan Legislature]] = Seal of Michigan.svg |[[Utah State Legislature]] = Seal of Utah.svg <!--DEFAULT--> |#default = <!-- None --> }}</includeonly><noinclude>{{Documentation}}</noinclude> 848212dfb5be22baf76aac5d4fe0e568b3404930 Template:Use dmy dates 10 122 302 2022-02-22T16:24:28Z en>Frietjes 0 fix |=February 2022 bug (see https://en.wikipedia.org/w/index.php?title=Night_of_the_Pencils_(film)&type=revision&diff=1073091061&oldid=1067523640 which transcluded [[Template:February 2022]]) wikitext text/x-wiki {{ <includeonly>safesubst:</includeonly>#invoke:Unsubst||date=__DATE__ |$B= {{DMCA|Use dmy dates|from|{{{date|}}}}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using Use dmy dates template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Use dmy dates]] with unknown parameter "_VALUE_"|ignoreblank=y| cs1-dates | date }}}}<noinclude>{{documentation}}</noinclude> 3a087cd27e88fd70a0765c62d5ab506c3b73c9e7 Template:Replace 10 161 384 2022-02-23T02:25:08Z wikipedia>Xaosflux 0 Changed protection settings for "[[Template:Replace]]": 1MM+ uses ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:String|replace|source={{{1}}}|{{{2}}}|{{{3}}}|plain={{{plain|true}}}|count={{{count|}}}}}<noinclude> {{documentation}} </noinclude> 4192ba916713e0f44fdfd0f8e0d9d105c0c85472 Module:Effective protection expiry 828 46 87 2022-02-23T10:59:29Z en>Xaosflux 0 Changed protection settings for "[[Module:Effective protection expiry]]": used in the mediawiki interface / match [[Module:Effective protection level]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) Scribunto text/plain local p = {} -- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title) return stabilitySettings and stabilitySettings.expiry or 'unknown' elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 ) end local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename) if rawExpiry == 'infinity' then return 'infinity' elseif rawExpiry == '' then return 'unknown' else local year, month, day, hour, minute, second = rawExpiry:match( '^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$' ) if year then return string.format( '%s-%s-%sT%s:%s:%s', year, month, day, hour, minute, second ) else error('internal error in Module:Effective protection expiry; malformed expiry timestamp') end end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p 9a8c58dc2667232ed08a9b206a5d89ca8150312b Template:Country data France 10 139 340 2022-02-25T18:09:43Z wikipedia>Paine Ellsworth 0 no longer required - High use template is now in the documentation wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = France | flag alias = Flag of France.svg | flag alias-1790 = Flag of France (1790–1794).svg | flag alias-1794 = Flag of France (1794–1815, 1830–1958).svg | flag alias-1814 = Royal flag of France during the Bourbon Restoration.svg | flag alias-1830 = Flag of France (1794–1815, 1830–1958).svg | flag alias-1848 = Drapeau france 1848.svg | flag alias-1848a = Drapeau france 1848.svg | flag alias-1848b = Flag of France (1794–1815, 1830–1958).svg | flag alias-1974 = Flag of France (lighter variant).svg | flag alias-naval = Civil and Naval Ensign of France.svg | flag alias-naval-1790 = Flag of French-Navy-Revolution.svg | flag alias-air force = Flag of France.svg | link alias-air force = French Air and Space Force | flag alias-coast guard = French Maritime Gendarmerie racing stripe.svg | border-coast guard = | link alias-coast guard = French Maritime Gendarmerie | flag alias-army = Flag of France.svg | link alias-army = French Army | link alias-naval = French Navy | flag alias-navy = Civil and Naval Ensign of France.svg | link alias-navy = French Navy | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1790 | var2 = 1794 | var3 = 1814 | var4 = 1830 | var5 = 1848a | var6 = 1848b | var7 = 1974 | var8 = naval-1790 | redir1 = FRA | related1 = Kingdom of France | related2 = Free France </noinclude> }} 8afff5d797339e01eef025cd5e147c2d2f943a0f Template:Country data Ukraine 10 153 368 2022-02-25T18:28:57Z wikipedia>Paine Ellsworth 0 no longer required - High use template is now in the documentation wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Ukraine | flag alias = Flag of Ukraine.svg | flag alias-1918 = Flag of Ukrainian People's Republic 1917.svg | flag alias-1991 = Flag of the Ukrainian Soviet Socialist Republic.svg | flag alias-1992 = Flag of Ukraine (1992–2006).svg | flag alias-army = Ensign of the Ukrainian Ground Forces.svg | flag alias-military=Ensign of the Ukrainian Armed Forces.svg | link alias-military=Ukrainian Armed Forces | flag alias-marines=Flag of the Ukrainian Naval Infantry.png | link alias-marines=Ukrainian Naval Infantry | link alias-army = Ukrainian Ground Forces | flag alias-coast guard=Sea Guard Ensign of Ukraine (dress).svg | link alias-coast guard=Ukrainian Sea Guard | flag alias-naval = Naval Ensign of Ukraine.svg | flag alias-naval-1918 = Naval Ensign of Ukraine 1918 July.svg | link alias-naval = Ukrainian Navy | flag alias-air force = Ensign of the Ukrainian Air Force.svg | link alias-air force = Ukrainian Air Force | flag alias-navy = Naval Ensign of Ukraine.svg | link alias-navy = Ukrainian Navy | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1918 | var2 = naval-1918 | var3 = 1991 | var4 = 1992 | redir1 = UKR | related1 = Zaporozhian Sich | related2 = Cossack Hetmanate | related3 = Ukrainian People's Republic | related4 = West Ukrainian People's Republic | related5 = Ukrainian People's Republic of Soviets | related6 = Ukrainian Soviet Republic | related7 = Ukrainian SSR | related8 = Carpatho-Ukraine | related9 = Ukrainian National Government </noinclude> }} e83720792814b2f02e044f3f60a1617471d9f569 Template:Country data Italy 10 143 348 2022-02-25T19:19:17Z wikipedia>Paine Ellsworth 0 no longer required - High use template is now in the documentation wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Italy | flag alias = Flag of Italy.svg | flag alias-1861 = Flag of Italy (1861–1946).svg | flag alias-1943 = War flag of the Italian Social Republic.svg | flag alias-2003 = Flag of Italy (2003–2006).svg | flag alias-civil = Civil Ensign of Italy.svg | flag alias-naval = Naval Ensign of Italy.svg | flag alias-navy-1947 = Naval Ensign of Italy (1947-2013).svg | link alias-naval = Italian Navy | link alias-air force = Italian Air Force | link alias-army = Italian Army | flag alias-navy = Naval Ensign of Italy.svg | link alias-navy = Italian Navy | link alias-roller hockey = Italy {{{mw}}} national roller hockey team | size = {{{size|}}} | name = {{{name|}}} | variant = {{{variant|}}} | altlink = {{{altlink|}}} | altvar = {{{altvar|}}} <noinclude> | var1 = 1861 | var2 = 1943 | var4 = 2003 | var5 = civil | var6 = navy-1947 | redir1 = ITA | related1 = Kingdom of Italy | related2 = Italian Social Republic | related3 = Napoleonic Italy </noinclude> }} 305bf5a66b74b7211326d9326b28d66a836e8721 Template:Country data United Kingdom 10 154 370 2022-02-25T21:47:53Z wikipedia>Paine Ellsworth 0 no longer required - High use template is now in the documentation wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = United Kingdom | flag alias = Flag of the United Kingdom.svg | flag alias-civil = Civil Ensign of the United Kingdom.svg | flag alias-civil-air = Civil Air Ensign of the United Kingdom.svg | flag alias-government = Government Ensign of the United Kingdom.svg | flag alias-naval = Naval Ensign of the United Kingdom.svg | flag alias-naval-RFA = British-Royal-Fleet-Auxiliary-Ensign.svg | flag alias-naval-RMAS = British Royal Maritime Auxiliary Ensign.svg | flag alias-naval-GS = Government Service Ensign.svg | flag alias-naval-RNLI = Flag of the Royal National Lifeboat Institution.svg | link alias-naval-RNLI = Royal National Lifeboat Institution | flag alias-1707 = Flag of Great Britain (1707–1800).svg | link alias-naval-1707 = Royal Navy | flag alias-naval-reserve = Naval Ensign of the United Kingdom.svg | flag alias-naval-merchant = Civil Ensign of the United Kingdom.svg | link alias-naval = {{#switch:{{{variant|}}}|naval-RFA|RFA=Royal Fleet Auxiliary|naval-RMAS|RMAS=Royal Maritime Auxiliary Service|naval-RNLI|RNLI=Royal National Lifeboat Institution|naval-reserve|reserve=Royal Naval Reserve|naval-merchant|merchant=Merchant Navy (United Kingdom){{!}}Merchant Navy|#default=Royal Navy}} | flag alias-naval-1707 = Naval ensign of Great Britain (1707–1800).svg | flag alias-air force = Ensign of the Royal Air Force.svg | link alias-air force = Royal Air Force | flag alias-army = Flag of the British Army.svg | link alias-army = British Army | flag alias-military = Flag of the United Kingdom (3-5).svg | link alias-military = British Armed Forces | flag alias-marines = Flag of the Royal Marines.svg | link alias-marines = Corps of Royal Marines | flag alias-coast guard = Flag of Her Majesty's Coastguard.svg | link alias-coast guard = Her Majesty's Coastguard | flag alias-navy = Naval Ensign of the United Kingdom.svg | link alias-navy = Royal Navy | size = {{{size|}}} | name = {{#ifeq:{{{name|}}}|Britain|United Kingdom|{{{name|}}}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = civil | var2 = government | var3 = naval-RFA | var4 = naval-RMAS | var5 = naval-RNLI | var6 = 1707 | var7 = civil-air | redir1 = UK | redir2 = U.K. | redir3 = the United Kingdom | related1 = Great Britain | related2 = Kingdom of Great Britain | related3 = British Empire | related4 = United Kingdom of Great Britain and Ireland | related5 = Kingdom of England | related6 = Kingdom of Scotland </noinclude> }} 6b40c4fb81cb83acc109c4a8d621c25ba0bdd0b6 Template:Country data Japan 10 144 350 2022-02-25T21:50:22Z wikipedia>Paine Ellsworth 0 no longer required - High use template is now in the documentation wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Japan | flag alias = Flag of Japan.svg | flag alias-1870 = Flag of Japan (1870-1999).svg | link alias-1870 = Empire of Japan | flag alias-1945 = Flag of Allied Occupied Japan.svg | border-1945 = | flag alias-1947 = Flag of Japan (1870-1999).svg | flag alias-ryukyu = Flag of US Occupied Ryukyu Islands.svg | border-ryukyu = | flag alias-naval = Naval Ensign of Japan.svg | flag alias-coast guard = Ensign of the Japanese Coast Guard.svg | link alias-coast guard = Japan Coast Guard | link alias-naval = Japan Maritime Self-Defense Force | flag alias-army = Flag of JSDF.svg | link alias-army = Japan Ground Self-Defense Force | flag alias-air force = Flag of the Japan Air Self-Defense Force.svg | link alias-air force = Japan Air Self-Defense Force | flag alias-air force-1955 = Flag of the Japan Air Self-Defense Force (1955-1957).png | link alias-air force-1955 = Japan Air Self-Defense Force | flag alias-air force-1957 = Flag of the Japan Air Self-Defense Force (1957-1972).png | link alias-air force-1957 = Japan Air Self-Defense Force | flag alias-air force-1972 = Flag of the Japan Air Self-Defense Force (1972-2001).png | link alias-air force-1972 = Japan Air Self-Defense Force | flag alias-military=Flag of the Japan Self-Defense Forces.svg | link alias-military=Japan Self-Defense Forces | flag alias-marines=Flag of JSDF.svg | link alias-marines=Japanese Amphibious Rapid Deployment Brigade | flag alias-navy = Naval Ensign of Japan.svg | link alias-navy = Japan Maritime Self-Defense Force | {{#ifeq:{{{altlink}}}|A national rugby union team|link alias-rugby union|empty}} = Junior Japan | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1870 | var2 = 1945 | var3 = 1947 | var4 = ryukyu | redir1 = JPN | related1 = Empire of Japan </noinclude> }} 1f2cfaba0a9252c2a5fba884e76d18c18b00418f Template:Country data Germany 10 141 344 2022-02-25T22:25:23Z wikipedia>Paine Ellsworth 0 no longer required - High use template is now in the documentation wikitext text/x-wiki {{safesubst<noinclude />: {{{1<noinclude>|country showdata</noinclude>}}} | alias = Germany | flag alias = Flag of Germany.svg | flag alias-1866 = Flag of the German Empire.svg | link alias-1866 = German Empire | flag alias-empire = Flag of the German Empire.svg | link alias-empire = German Empire | flag alias-1919 = Flag of Germany (3-2 aspect ratio).svg | link alias-1919 = Weimar Republic | flag alias-Weimar = Flag of Germany (3-2 aspect ratio).svg | link alias-Weimar = Weimar Republic | flag alias-1933 = Flag of Germany (1933-1935).svg | flag alias-1935 = Flag of Germany (1935–1945).svg | link alias-1935 = Nazi Germany | flag alias-Nazi = Flag of Germany (1935–1945).svg | link alias-Nazi = Nazi Germany | flag alias-1946 = Merchant flag of Germany (1946–1949).svg | border-1946 = | flag alias-1949 = Flag of Germany.svg | flag alias-EUA = German Olympic flag (1959-1968).svg | flag alias-gold = Flag of West Germany; Flag of Germany (1990–1996).svg | flag alias-state = Flag of Germany (state).svg | flag alias-naval = Naval Ensign of Germany.svg | border-naval = | link alias-naval = German Navy | flag alias-coast guard=German Federal Coast Guard racing stripe.svg | border-coast guard= | link alias-coast guard=German Federal Coast Guard | flag alias-army = Colour of Germany.svg | flag alias-air force =Flag of Germany (state).svg | link alias-air force = German Air Force | link alias-army = German Army | flag alias-navy = Naval Ensign of Germany.svg | link alias-navy = German Navy | border-army= | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1866 | var2 = empire | var3 = 1919 | var4 = Weimar | var5 = 1933 | var6 = 1935 | var7 = Nazi | var8 = 1946 | var9 = 1949 | var10 = EUA | var11 = gold | var12 = state | redir1 = DEU | redir2 = GER | related1 = German Empire | related2 = Weimar Republic | related3 = Nazi Germany | related4 = Allied-occupied Germany | related5 = East Germany | related6 = West Germany </noinclude> }} 9275a41a1d28ccc5f85b3aff4915ff95112ef25e Template:Country data South Africa 10 151 364 2022-02-26T07:15:20Z wikipedia>Paine Ellsworth 0 no longer required - High use template is now in the documentation wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = South Africa | flag alias = Flag of South Africa.svg | flag alias-1795 = Flag of Great Britain (1707–1800).svg | flag alias-1801 = Flag of the United Kingdom.svg | flag alias-1857 = Flag of Transvaal.svg | flag alias-1875 = Flag of the Natal Colony (1875–1910).svg | flag alias-1876 = Flag of the Cape Colony 1876-1910.svg | flag alias-1902 = Flag of Orange River Colony.svg | flag alias-1910 = South Africa Flag 1910-1912.svg | flag alias-1912 = Red Ensign of South Africa (1912-1951).svg | flag alias-1928 = Flag of South Africa (1928–1994).svg | flag alias-1982 = Flag of South Africa (1982–1994).svg | flag alias-naval = Naval Ensign of South Africa.svg | flag alias-naval-1922 = Naval Ensign of the United Kingdom.svg | flag alias-naval-1946 = Naval Ensign of South Africa (1946-1951).svg | flag alias-naval-1951 = Naval Ensign of South Africa (1951-1952).svg | flag alias-naval-1952 = Naval Ensign of South Africa (1952-1981).svg | flag alias-naval-1981 = Naval Ensign of South Africa (1981-1994).svg | flag alias-marines=Naval Ensign of South Africa.svg | link alias-marines=South African Maritime Reaction Squadron | link alias-naval = South African Navy | flag alias-air force = Ensign of the South African Air Force.svg | flag alias-air force-1940 = Ensign of the South African Air Force 1940-1951.svg | flag alias-air force-1951 = Ensign of the South African Air Force 1951-1958.svg | flag alias-air force-1958 = Ensign of the South African Air Force (1958-1967, 1970-1981).svg | flag alias-air force-1967 = Ensign of the South African Air Force 1967-1970.svg | flag alias-air force-1981 = Ensign of the South African Air Force 1981-1982.svg | flag alias-air force-1982 = Ensign of the South African Air Force (1982-1994).svg | flag alias-air force-1994 = Ensign of the South African Air Force 1994-2003.svg | link alias-air force = South African Air Force | flag alias-army = Flag of the South African Army.svg | flag alias-army-1951 = Flag of the South African Army (1951–1966).png | flag alias-army-1966 = Flag of the South African Army (1966–1973).png | flag alias-army-1973 = Flag of the South African Army (1973–1994).svg | flag alias-army-1981 = Ensign of the South African Defence Force (1981-1994).svg | flag alias-army-1994 = Flag of the South African Army (1994–2002).svg | flag alias-army-2002 = Flag of the South African Army (2002–2003).svg | link alias-army = South African Army | flag alias-military = Flag of the South African National Defence Force.svg | link alias-military = South African National Defence Force | flag alias-navy = Naval Ensign of South Africa.svg | link alias-navy = South African Navy | link alias-football = South Africa {{{mw|}}} national {{{age|}}} soccer {{{class|}}} team | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | altvar = {{{altvar|}}} | variant = {{{variant|}}} <noinclude> | var1= 1795 | var2= 1801 | var3= 1857 | var4= 1875 | var5= 1876 | var6 = 1902 | var7 = 1910 | var8 = 1912 | var9 = 1928 | var10 = 1982 | var11 = naval-1922 | var12 = naval-1946 | var13 = naval-1952 | var14 = naval-1981 | var15 = air force-1940 | var16 = air force-1951 | var17 = air force-1958 | var18 = air force-1967 | var19 = air force-1981 | var20 = air force-1982 | var21 = air force-1994 | var22 = army-1951 | var23 = army-1966 | var24 = army-1973 | var25 = army-1981 | var26 = army-1994 | var27 = army-2002 | redir1 = ZAF | redir2 = RSA | related1 = South African Republic | related2 = Union of South Africa | related3 = Cape Colony </noinclude> }} fdde0b214de19a2be526de95c075934bb8997dd9 Template:Country data Sweden 10 152 366 2022-02-26T20:50:12Z wikipedia>Paine Ellsworth 0 no longer required - High use template is now in the documentation wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Sweden | flag alias = Flag of Sweden.svg | flag alias-army = Naval Ensign of Sweden.svg | flag alias-air force =Naval Ensign of Sweden.svg | flag alias-1562 = Sweden-Flag-1562.svg | border-1562 = | flag alias-1818 = Swedish and Norwegian merchant flag 1818-1844.svg | flag alias-1844 = Swedish civil ensign (1844–1905).svg | flag alias-naval = Naval Ensign of Sweden.svg | flag alias-naval-1844 = Naval Ensign of Sweden (1844-1905).svg | flag alias-naval-1815 = Swedish and Norwegian naval ensign (1815-1844).svg | link alias-army = Swedish Army | border-army= | border-air force= | link alias-air force = Swedish Air Force | border-naval = | link alias-naval = Swedish Navy | flag alias-navy = Naval Ensign of Sweden.svg | link alias-navy = Swedish Navy | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | altvar = {{{altvar|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1562 | var2 = 1818 | var3 = 1844 | var4 = naval-1844 | var5 = naval-1815 | redir1 = SWE </noinclude> }} deecf04263a2227ef046b62b52f74afe0bf8e624 Template:Country data India 10 142 346 2022-02-26T20:53:32Z wikipedia>Paine Ellsworth 0 no longer required - High use template is now in the documentation wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = India | flag alias = Flag of India.svg | flag alias-British = British Raj Red Ensign.svg | flag alias-1931 = 1931 Flag of India.svg | flag alias-civil = Civil Ensign of India.svg | flag alias-army = Flag of Indian Army.svg | link alias-army = Indian Army | flag alias-naval = Naval Ensign of India.svg | flag alias-air force = Air Force Ensign of India.svg | flag alias-coast guard = Indian Coast Guard flag.svg | link alias-coast guard = Indian Coast Guard | link alias-naval = Indian Navy | link alias-air force = Indian Air Force | flag alias-navy = Naval Ensign of India.svg | link alias-navy = Indian Navy | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = British | var2 = 1931 | var4 = civil | redir1 = IND | related1 = British Raj | related2 = Dominion of India </noinclude> }} 4e77fe6241ffe394cd01006ad4972108fb4f5f33 Template:Country data Egypt 10 137 336 2022-02-26T21:38:37Z wikipedia>Paine Ellsworth 0 no longer required - High use template is now in the documentation wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Egypt | flag alias = Flag of Egypt.svg | flag alias-Ottoman = Flag of Egypt (1793-1844).svg | flag alias-1882 = Flag of Egypt (1882-1922).svg | flag alias-1922 = Flag of Egypt (1922–1958).svg | flag alias-1952 = Flag of Egypt (1952-1958).svg | flag alias-1958 = Flag of the United Arab Republic.svg | flag alias-1972 = Flag of Egypt (1972-1984).svg | link alias-military = Egyptian Armed Forces | flag alias-army = Flag of the Army of Egypt.svg | link alias-army = Egyptian Army | flag alias-naval = Naval Ensign of Egypt.svg | link alias-naval = Egyptian Navy | flag alias-navy=Flag of the Egyptian Navy.svg | link alias-navy=Egyptian Navy | flag alias-air force = Eafflag.svg | link alias-air force = Egyptian Air Force | flag alias-air defence force = Flag of the Egyptian Air Defense Forces.svg | link alias-air defence force = Egyptian Air Defense Forces | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = Ottoman | var2 = 1882 | var3 = 1922 | var4 = 1952 | var5 = 1958 | var6 = 1972 | var7 = air defence force | redir1 = EGY | related1 = United Arab Republic </noinclude> }} c5e959f0c9cc5aac05dc43da1f663fe0b9cf3a19 Template:Country data Colombia 10 136 334 2022-02-26T21:41:17Z wikipedia>Paine Ellsworth 0 no longer required - High use template is now in the documentation wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Colombia | flag alias = Flag of Colombia.svg | flag alias-1861 = Flag of Colombia (WFB 2013).gif | flag alias-2004 = Flag of Colombia (2004 World Factbook).gif | flag alias-civil = Civil Ensign of Colombia.svg | flag alias-naval = Naval Ensign of Colombia.svg | link alias-naval = Colombian National Navy | flag alias-army = Flag of the Colombian Army.svg | link alias-army = Colombian National Army | flag alias-air force = Flag of the Colombian Air Force.svg | link alias-air force = Colombian Air Force | flag alias-marines=Flag of the Colombian Naval Infantry.png | link alias-marines=Colombian Naval Infantry | link alias-navy = Colombian National Navy | flag alias-navy = Flag of the Colombian Navy.png | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1861 | var2 = 2004 | var3 = civil | redir1 = COL </noinclude> }} 39587c424da5a5f0c766a5a1742678a027dad3aa Template:Collapse top 10 9 13 2022-02-26T21:47:36Z en>Izno 0 fix left wikitext text/x-wiki <div style="margin-left:{{{indent|0}}}"><!-- NOTE: width renders incorrectly if added to main STYLE section --> {| <!-- Template:Collapse top --> class="mw-collapsible {{<includeonly>safesubst:</includeonly>#if:{{{expand|{{{collapse|}}}}}}||mw-collapsed}} {{{class|}}}" style="background: {{{bg1|transparent}}}; text-align: left; border: {{{border|1px}}} solid {{{b-color|Silver}}}; margin: 0.2em auto auto; width:{{<includeonly>safesubst:</includeonly>#if:{{{width|}}}|{{{width}}}|100%}}; clear: {{{clear|both}}}; padding: 1px;" |- ! style="background: {{{bg|#{{main other|F0F2F5|CCFFCC}}}}}; font-size:87%; padding:0.2em 0.3em; text-align:{{<includeonly>safesubst:</includeonly>#if:{{{left|}}}|left|{{<includeonly>safesubst:</includeonly>#if:{{{align|}}}|left|center}}}}; {{<includeonly>safesubst:</includeonly>#if:{{{fc|}}}|color: {{{fc}}};|}}" | <div style="font-size:115%;{{<includeonly>safesubst:</includeonly>#if:{{{left|}}}||margin:0 4em}}">{{{1|{{{title|{{{reason|{{{header|{{{heading|{{{result|Extended content}}}}}}}}}}}}}}}}}}</div> {{<includeonly>safesubst:</includeonly>#if:{{{warning|{{{2|}}}}}} |{{<includeonly>safesubst:</includeonly>!}}- {{<includeonly>safesubst:</includeonly>!}} style="text-align:center; font-style:italic;" {{<includeonly>safesubst:</includeonly>!}} {{{2|The following is a closed discussion. {{strongbad|Please do not modify it.}} }}} }} |- | style="border: solid {{{border2|1px Silver}}}; padding: {{{padding|0.6em}}}; background: {{{bg2|White}}};" {{<includeonly>safesubst:</includeonly>!}}<noinclude> {{lorem ipsum|3}} {{Collapse bottom}} {{Documentation}} </noinclude> 425bc5d076d65778fb01413c15215d03fead9db1 14 13 2022-07-12T15:19:42Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <div style="margin-left:{{{indent|0}}}"><!-- NOTE: width renders incorrectly if added to main STYLE section --> {| <!-- Template:Collapse top --> class="mw-collapsible {{<includeonly>safesubst:</includeonly>#if:{{{expand|{{{collapse|}}}}}}||mw-collapsed}} {{{class|}}}" style="background: {{{bg1|transparent}}}; text-align: left; border: {{{border|1px}}} solid {{{b-color|Silver}}}; margin: 0.2em auto auto; width:{{<includeonly>safesubst:</includeonly>#if:{{{width|}}}|{{{width}}}|100%}}; clear: {{{clear|both}}}; padding: 1px;" |- ! style="background: {{{bg|#{{main other|F0F2F5|CCFFCC}}}}}; font-size:87%; padding:0.2em 0.3em; text-align:{{<includeonly>safesubst:</includeonly>#if:{{{left|}}}|left|{{<includeonly>safesubst:</includeonly>#if:{{{align|}}}|left|center}}}}; {{<includeonly>safesubst:</includeonly>#if:{{{fc|}}}|color: {{{fc}}};|}}" | <div style="font-size:115%;{{<includeonly>safesubst:</includeonly>#if:{{{left|}}}||margin:0 4em}}">{{{1|{{{title|{{{reason|{{{header|{{{heading|{{{result|Extended content}}}}}}}}}}}}}}}}}}</div> {{<includeonly>safesubst:</includeonly>#if:{{{warning|{{{2|}}}}}} |{{<includeonly>safesubst:</includeonly>!}}- {{<includeonly>safesubst:</includeonly>!}} style="text-align:center; font-style:italic;" {{<includeonly>safesubst:</includeonly>!}} {{{2|The following is a closed discussion. {{strongbad|Please do not modify it.}} }}} }} |- | style="border: solid {{{border2|1px Silver}}}; padding: {{{padding|0.6em}}}; background: {{{bg2|White}}};" {{<includeonly>safesubst:</includeonly>!}}<noinclude> {{lorem ipsum|3}} {{Collapse bottom}} {{Documentation}} </noinclude> 425bc5d076d65778fb01413c15215d03fead9db1 Template:Ns has subpages 10 121 300 2022-03-02T10:43:18Z en>Trialpears 0 Changed protection settings for "[[Template:Ns has subpages]]": [[WP:High-risk templates|Highly visible template]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:Ns has subpages|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 060d2d01af26cb67fd90a7c346a0d2d5e450a040 Module:Template link general 828 105 268 2022-03-08T08:30:51Z en>Primefac 0 update from sandbox - fixes to _show_result and adding _expand Scribunto text/plain -- This implements Template:Tlg local getArgs = require('Module:Arguments').getArgs local p = {} -- Is a string non-empty? local function _ne(s) return s ~= nil and s ~= "" end local nw = mw.text.nowiki local function addTemplate(s) local i, _ = s:find(':', 1, true) if i == nil then return 'Template:' .. s end local ns = s:sub(1, i - 1) if ns == '' or mw.site.namespaces[ns] then return s else return 'Template:' .. s end end local function trimTemplate(s) local needle = 'template:' if s:sub(1, needle:len()):lower() == needle then return s:sub(needle:len() + 1) else return s end end local function linkTitle(args) if _ne(args.nolink) then return args['1'] end local titleObj local titlePart = '[[' if args['1'] then -- This handles :Page and other NS titleObj = mw.title.new(args['1'], 'Template') else titleObj = mw.title.getCurrentTitle() end titlePart = titlePart .. (titleObj ~= nil and titleObj.fullText or addTemplate(args['1'])) local textPart = args.alttext if not _ne(textPart) then if titleObj ~= nil then textPart = titleObj:inNamespace("Template") and args['1'] or titleObj.fullText else -- redlink textPart = args['1'] end end if _ne(args.subst) then -- HACK: the ns thing above is probably broken textPart = 'subst:' .. textPart end if _ne(args.brace) then textPart = nw('{{') .. textPart .. nw('}}') elseif _ne(args.braceinside) then textPart = nw('{') .. textPart .. nw('}') end titlePart = titlePart .. '|' .. textPart .. ']]' if _ne(args.braceinside) then titlePart = nw('{') .. titlePart .. nw('}') end return titlePart end function p.main(frame) local args = getArgs(frame, { trim = true, removeBlanks = false }) return p._main(args) end function p._main(args) local bold = _ne(args.bold) or _ne(args.boldlink) or _ne(args.boldname) local italic = _ne(args.italic) or _ne(args.italics) local dontBrace = _ne(args.brace) or _ne(args.braceinside) local code = _ne(args.code) or _ne(args.tt) local show_result = _ne(args._show_result) local expand = _ne(args._expand) -- Build the link part local titlePart = linkTitle(args) if bold then titlePart = "'''" .. titlePart .. "'''" end if _ne(args.nowrapname) then titlePart = '<span class="nowrap">' .. titlePart .. '</span>' end -- Build the arguments local textPart = "" local textPartBuffer = "&#124;" local codeArguments = {} local codeArgumentsString = "" local i = 2 local j = 1 while args[i] do local val = args[i] if val ~= "" then if _ne(args.nowiki) then -- Unstrip nowiki tags first because calling nw on something that already contains nowiki tags will -- mangle the nowiki strip marker and result in literal UNIQ...QINU showing up val = nw(mw.text.unstripNoWiki(val)) end local k, v = string.match(val, "(.*)=(.*)") if not k then codeArguments[j] = val j = j + 1 else codeArguments[k] = v end codeArgumentsString = codeArgumentsString .. textPartBuffer .. val if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end textPart = textPart .. textPartBuffer .. val end i = i + 1 end -- final wrap local ret = titlePart .. textPart if not dontBrace then ret = nw('{{') .. ret .. nw('}}') end if _ne(args.a) then ret = nw('*') .. '&nbsp;' .. ret end if _ne(args.kbd) then ret = '<kbd>' .. ret .. '</kbd>' end if code then ret = '<code>' .. ret .. '</code>' elseif _ne(args.plaincode) then ret = '<code style="border:none;background:transparent;">' .. ret .. '</code>' end if _ne(args.nowrap) then ret = '<span class="nowrap">' .. ret .. '</span>' end --[[ Wrap as html?? local span = mw.html.create('span') span:wikitext(ret) --]] if _ne(args.debug) then ret = ret .. '\n<pre>' .. mw.text.encode(mw.dumpObject(args)) .. '</pre>' end if show_result then local result = mw.getCurrentFrame():expandTemplate{title = addTemplate(args[1]), args = codeArguments} ret = ret .. " → " .. result end if expand then local query = mw.text.encode('{{' .. addTemplate(args[1]) .. string.gsub(codeArgumentsString, textPartBuffer, "|") .. '}}') local url = mw.uri.fullUrl('special:ExpandTemplates', 'wpInput=' .. query) mw.log() ret = ret .. " [" .. tostring(url) .. "]" end return ret end return p c7307fa3959d308a2dd7fd2f5009c1ce6db3d122 Module:InfoboxImage 828 52 99 2022-03-13T19:18:18Z en>WOSlinker 0 add class param from sandbox as per edit request Scribunto text/plain -- Inputs: -- image - Can either be a bare filename (with or without the File:/Image: prefix) or a fully formatted image link -- page - page to display for multipage images (DjVu) -- size - size to display the image -- maxsize - maximum size for image -- sizedefault - default size to display the image if size param is blank -- alt - alt text for image -- title - title text for image -- border - set to yes if border -- center - set to yes, if the image has to be centered -- upright - upright image param -- suppressplaceholder - if yes then checks to see if image is a placeholder and suppresses it -- link - page to visit when clicking on image -- class - HTML classes to add to the image -- Outputs: -- Formatted image. -- More details available at the "Module:InfoboxImage/doc" page local i = {}; local placeholder_image = { "Blue - Replace this image female.svg", "Blue - Replace this image male.svg", "Female no free image yet.png", "Flag of None (square).svg", "Flag of None.svg", "Flag of.svg", "Green - Replace this image female.svg", "Green - Replace this image male.svg", "Image is needed female.svg", "Image is needed male.svg", "Location map of None.svg", "Male no free image yet.png", "Missing flag.png", "No flag.svg", "No free portrait.svg", "No portrait (female).svg", "No portrait (male).svg", "Red - Replace this image female.svg", "Red - Replace this image male.svg", "Replace this image female (blue).svg", "Replace this image female.svg", "Replace this image male (blue).svg", "Replace this image male.svg", "Silver - Replace this image female.svg", "Silver - Replace this image male.svg", "Replace this image.svg", "Cricket no pic.png", "CarersLogo.gif", "Diagram Needed.svg", "Example.jpg", "Image placeholder.png", "No male portrait.svg", "Nocover-upload.png", "NoDVDcover copy.png", "Noribbon.svg", "No portrait-BFD-test.svg", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Sin bandera.svg", "Sin escudo.svg", "Replace this image - temple.png", "Replace this image butterfly.png", "Replace this image.svg", "Replace this image1.svg", "Resolution angle.png", "Image-No portrait-text-BFD-test.svg", "Insert image here.svg", "No image available.png", "NO IMAGE YET square.png", "NO IMAGE YET.png", "No Photo Available.svg", "No Screenshot.svg", "No-image-available.jpg", "Null.png", "PictureNeeded.gif", "Place holder.jpg", "Unbenannt.JPG", "UploadACopyrightFreeImage.svg", "UploadAnImage.gif", "UploadAnImage.svg", "UploadAnImageShort.svg", "CarersLogo.gif", "Diagram Needed.svg", "No male portrait.svg", "NoDVDcover copy.png", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Noimage.gif", } function i.IsPlaceholder(image) -- change underscores to spaces image = mw.ustring.gsub(image, "_", " "); assert(image ~= nil, 'mw.ustring.gsub(image, "_", " ") must not return nil') -- if image starts with [[ then remove that and anything after | if mw.ustring.sub(image,1,2) == "[[" then image = mw.ustring.sub(image,3); image = mw.ustring.gsub(image, "([^|]*)|.*", "%1"); assert(image ~= nil, 'mw.ustring.gsub(image, "([^|]*)|.*", "%1") must not return nil') end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); assert(image ~= nil, "mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1') must not return nil") -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); -- capitalise first letter image = mw.ustring.upper(mw.ustring.sub(image,1,1)) .. mw.ustring.sub(image,2); for i,j in pairs(placeholder_image) do if image == j then return true end end return false end function i.InfoboxImage(frame) local image = frame.args["image"]; if image == "" or image == nil then return ""; end if image == "&nbsp;" then return image; end if frame.args["suppressplaceholder"] ~= "no" then if i.IsPlaceholder(image) == true then return ""; end end if mw.ustring.lower(mw.ustring.sub(image,1,5)) == "http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "[http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[[http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "https:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[https:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,8)) == "[[https:" then return ""; end if mw.ustring.sub(image,1,2) == "[[" then -- search for thumbnail images and add to tracking cat if found local cat = ""; if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, "|%s*thumb%s*[|%]]") or mw.ustring.find(image, "|%s*thumbnail%s*[|%]]")) then cat = "[[Category:Pages using infoboxes with thumbnail images]]"; end return image .. cat; elseif mw.ustring.sub(image,1,2) == "{{" and mw.ustring.sub(image,1,3) ~= "{{{" then return image; elseif mw.ustring.sub(image,1,1) == "<" then return image; elseif mw.ustring.sub(image,1,5) == mw.ustring.char(127).."UNIQ" then -- Found strip marker at begining, so pass don't process at all return image; elseif mw.ustring.sub(image,4,9) == "`UNIQ-" then -- Found strip marker at begining, so pass don't process at all return image; else local result = ""; local page = frame.args["page"]; local size = frame.args["size"]; local maxsize = frame.args["maxsize"]; local sizedefault = frame.args["sizedefault"]; local alt = frame.args["alt"]; local link = frame.args["link"]; local title = frame.args["title"]; local border = frame.args["border"]; local upright = frame.args["upright"] or ""; local thumbtime = frame.args["thumbtime"] or ""; local center = frame.args["center"]; local class = frame.args["class"]; -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end if maxsize ~= "" and maxsize ~= nil then -- if no sizedefault then set to maxsize if sizedefault == "" or sizedefault == nil then sizedefault = maxsize end -- check to see if size bigger than maxsize if size ~= "" and size ~= nil then local sizenumber = tonumber(mw.ustring.match(size,"%d*")) or 0; local maxsizenumber = tonumber(mw.ustring.match(maxsize,"%d*")) or 0; if sizenumber>maxsizenumber and maxsizenumber>0 then size = maxsize; end end end -- add px to size if just a number if (tonumber(size) or 0) > 0 then size = size .. "px"; end -- add px to sizedefault if just a number if (tonumber(sizedefault) or 0) > 0 then sizedefault = sizedefault .. "px"; end result = "[[File:" .. image; if page ~= "" and page ~= nil then result = result .. "|page=" .. page; end if size ~= "" and size ~= nil then result = result .. "|" .. size; elseif sizedefault ~= "" and sizedefault ~= nil then result = result .. "|" .. sizedefault; else result = result .. "|frameless"; end if center == "yes" then result = result .. "|center" end if alt ~= "" and alt ~= nil then result = result .. "|alt=" .. alt; end if link ~= "" and link ~= nil then result = result .. "|link=" .. link; end if border == "yes" then result = result .. "|border"; end if upright == "yes" then result = result .. "|upright"; elseif upright ~= "" then result = result .. "|upright=" .. upright; end if thumbtime ~= "" then result = result .. "|thumbtime=" .. thumbtime; end if class ~= nil and class ~= "" then result = result .. "|class=" .. class; end -- if alt value is a keyword then do not use as a description if alt == "thumbnail" or alt == "thumb" or alt == "frameless" or alt == "left" or alt == "center" or alt == "right" or alt == "upright" or alt == "border" or mw.ustring.match(alt or "", '^[0-9]*px$', 1) ~= nil then alt = nil; end if title ~= "" and title ~= nil then -- does title param contain any templatestyles? If yes then set to blank. if mw.ustring.match(frame:preprocess(title), 'UNIQ%-%-templatestyles', 1) ~= nil then title = nil; end end if title ~= "" and title ~= nil then result = result .. "|" .. title; end result = result .. "]]"; return result; end end return i; 0ee5fe75ba239fc5c9cedc81ca11bdc0be068542 Template:Infobox legislature/doc 10 83 218 2022-03-18T23:16:53Z en>Hairy Dude 0 /* Parameter descriptions */using line breaks for lists is an accessibility fail - use real lists instead wikitext text/x-wiki {{Documentation subpage}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> {{lua|Module:Infobox|Module:InfoboxImage|Module:Check for unknown parameters}} Infobox to be used in articles about a [[legislature]] as a whole, or any [[Chambers of parliament|chamber]] found within a [[unicameralism|unicameral]], [[bicameralism|bicameral]], [[tricameralism|tricameral]] or [[tetracameralism|tetracameral]] assembly. == Usage == This is a template meant to be used in articles referring to legislatures (national, sub-national, federal, local, unicameral, bicameral, each of the chambers (if bicameral) or the whole body) that exist (currently function) or that don't exist (defunct legislative, disbanded ones). ===Syntax=== {{Parameter names example |_display=italics |name |native_name |native_name_lang |transcription_name |legislature |coa_pic=''<nowiki>coa_pic</nowiki>'' |coa_res |coa_alt |coa_caption |logo_pic=''<nowiki>logo_pic</nowiki>'' |logo_res |logo_alt |logo_caption |house_type=''<nowiki>house_type</nowiki>'' |body=''<nowiki>body</nowiki>'' |jurisdiction=''<nowiki>jurisdiction</nowiki>'' |houses |term_limits |foundation |disbanded |preceded_by |succeeded_by |new_session |leader1_type |leader1 |party1 |election1 |leader2_type |leader2 |party2 |election2 |leader3_type |leader3 |party3 |election3 |leader4_type |leader4 |party4 |election4 |leader5_type |leader5 |party5 |election5 |leader6_type |leader6 |party6 |election6 |leader7_type |leader7 |party7 |election7 |seats |house1 |house2 |structure1=''<nowiki>structure1</nowiki>'' |structure1_res=''structure1_res''<br /> |structure1_alt |structure2=''<nowiki>structure2</nowiki>'' |structure2_res=''structure2_res''<br /> |structure2_alt |political_groups1 |political_groups2 |committees1 |committees2 |joint_committees |term_length |authority |salary |seats1_title |seats1 |seats2_title |seats2 |seats3_title |seats3 |seats4_title |seats4 |seats5_title |seats5 |seats6_title |seats6 |seats7_title |seats7 |seats8_title |seats8 |voting_system1 |voting_system2 |first_election1 |first_election2 |first_election3 |last_election1 |last_election2 |last_election3 |next_election1 |next_election2 |next_election3 |redistricting |motto |session_room=''<nowiki>session_room</nowiki>'' |session_res=''session_res''<br /> |session_alt |meeting_place |session_room2=''<nowiki>session_room2</nowiki>'' |session_res2=''session_res2''<br /> |session_alt2 |meeting_place2 |session_room3=''<nowiki>session_room3</nowiki>'' |session_res3=''session_res3''<br /> |session_alt3 |meeting_place3 |website |constitution |rules |footnotes }} <pre style="overflow:auto;"> {{Infobox legislature | name = | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = | logo_res = | logo_alt = | logo_caption = | house_type = | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = | leader1 = | leader1_term = | party1 = | election1 = | leader2_type = | leader2 = | party2 = | election2 = | leader2_term = | leader3_type = | leader3 = | party3 = | election3 = | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = <!-- or | members = --> | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = | footnotes = }} </pre> {{clear}} === Parameter descriptions === The parameters are: * '''name''' – the name of the Parliament/House (e.g. House of Commons (UK); Parliament of Romania) * '''native_name''' – the name of the Parliament/House in the native language; use {{tl|Plainlist}} for more than one native language (e.g. Parlamentul of României). * '''native_name_lang''' – the language of the native name; use [[List of ISO 639-2 codes|ISO 639-2 code]], e.g. "fr" for French; if there is more than one native name, in different languages, enter those names using {{tl|Lang}}, instead * '''transcription_name''' – the name of the Parliament/House in transliteration from the native language alphabet (if different than Latin alphabet). Use {{Tld|plainlist}} for more than one native language * '''legislature''' – the term of the ongoing session (e.g.: "40th Canadian Parliament"; "10th Legislature (of Las Cortes Generales)") * '''coa_pic''' – image name for coat of arms (Optional) * '''coa_res''' – width in pixels for ''coa_pic'' image (Optional); defaults to 170px (about 75% of thumbnail size 220px but will vary if changed in [[Special:Preferences]]) due to use of ''upright'' in template (see {{section link|Wikipedia:Extended image syntax|Size}}) * '''coa_alt''' – [[WP:ALT|alternative text]] for ''coa_pic'' image * '''coa_caption''' – caption text to be display below ''coa_pic'' image (Optional) * '''logo_pic''' – image name for logo (Optional) * '''logo_res''' – width in pixels for ''logo_pic'' image (Optional); defaults to 170px (about 75% of thumbnail size 220px but will vary if changed in [[Special:Preferences]]) due to use of ''upright'' in template (see {{section link|Wikipedia:Extended image syntax|Size}}) * '''logo_alt''' – [[WP:ALT|alternative text]] for ''logo_pic'' image * '''logo_caption''' – caption text to be displayed below ''logo_pic'' image (Optional) * '''house_type''' – For houses, one of <code>upper house</code>, <code>lower house</code>, or <code>unicameral house</code>; for legislatures as a whole, one of <code>unicameral</code>, <code>bicameral</code>, <code>tricameral</code>, or <code>tetracameral</code>. The template will turn the input into a wikilink * '''body''' – name of large legislative assembly if a chamber * '''jurisdiction''' – * '''houses''' – names of the houses that make up the assembly; if more than one, separate with {{tlx|plainlist}} * '''term_limits''' – * '''foundation''' – date founded; use {{tl|Start date}} * '''disbanded''' – date disbanded; use {{tl|End date}} * '''preceded_by''' – preceding legislature * '''succeeded_by''' – succeeding legislature * '''new_session''' – date of the new session; use {{Tl|Start date}} * '''leader1_type''' – title of a chamber leader (speaker, chairman, president, etc.) * '''leader1''' – leader of the chamber * '''party1''' – political party of leader * '''election1''' – date that leader was elected * '''leader2_type''' – ''[[idem]]'' * '''leader2 ''' – ''idem'' * '''party2''' – ''idem'' * '''election2''' – ''idem'' * '''leader3_type''' – ''idem'' * '''leader3''' – ''idem'' * '''party3''' – ''idem'' * '''election4''' – ''idem'' * '''leader4_type''' – ''idem'' * '''leader4''' – ''idem'' * '''party4''' – ''idem'' * '''election5''' – ''idem'' * '''leader5_type''' – ''idem'' * '''leader5''' – ''idem'' * '''party5''' – ''idem'' * '''election6''' – ''idem'' * '''leader6_type''' – ''idem'' * '''leader6''' – ''idem'' * '''party6''' – ''idem'' * '''election6''' – ''idem'' * '''leader7_type''' – ''idem'' * '''leader7''' – ''idem'' * '''party7''' – ''idem'' * '''election7''' – ''idem'' * '''seats''' – the (total) number of seats in the assembly; if more than one, separate with {{tlx|plainlist}} * '''house1''' – name of the upper/lower house * '''house2''' – name of the lower/upper house * '''structure1''' – image name for diagram of the political structure of ''house1'' (Optional) * '''structure1_res''' – width in pixels for ''structure1'' image (Optional); defaults to 120px due to a setting in template * '''structure1_alt''' – [[WP:ALT|alternative text]] for ''structure1'' image * '''structure2''' – image name for diagram of the political structure of ''house2'' (Optional) * '''structure2_res''' – width in pixels for ''structure2'' image (Optional); defaults to 120px due to a setting in template * '''structure2_alt''' – [[WP:ALT|alternative text]] for ''structure2'' image * '''political_groups1''' – list of the political parties/groups represented in ''house1'' * '''political_groups2''' – list of the political parties/groups represented in ''house2'' * '''committees1''' – list of the committees in ''house1'' * '''committees2''' – list of the committees in ''house2'' * '''joint_committees''' – list of the joint committees * '''term_length''' – * '''authority''' – * '''salary''' – * '''seats1_title''' – * '''seats1''' – * '''seats2_title''' – * '''seats2''' – * '''seats3_title''' – * '''seats3''' – * '''seats4_title''' – * '''seats4''' – * '''seats5_title''' – * '''seats5''' – * '''seats6_title''' – * '''seats6''' – * '''seats7_title''' – * '''seats7''' – * '''seats8_title''' – * '''seats8''' – * '''voting_system1''' – the voting system used for the ''house1'' * '''voting_system2''' – the voting system used for the ''house2'' * '''first_election1''' – the first election date for the ''house1'' * '''first_election2''' – the first election date for the ''house2'' * '''first_election3''' – the first general election date * '''last_election1''' – the last election date for the ''house1'' * '''last_election2''' – the last election date for the ''house2'' * '''last_election3''' – the last general election date * '''next_election1''' – the next election date for ''house1'' * '''next_election2''' – the next election date for ''house2'' * '''next_election3''' – the next general election date * '''redistricting''' – * '''motto''' – Motto * '''session_room''' – image of the session room (Optional) * '''session_res''' – width in pixels for ''session_room'' image (Optional); defaults to 220px (but will vary if thumbnail size is changed in [[Special:Preferences]]) * '''session_alt''' – [[WP:ALT|alternative text]] for ''session_room'' image * '''meeting_place''' – place where it meets: room, building, or city (e.g. Palatul Parlamentului, Bucureşti); displayed as caption below ''session_room'' image * '''session_room2''' – second image of the session room (Optional) * '''session_res2''' – width in pixels for ''session_room2'' image (Optional); defaults to 220px (but will vary if thumbnail size is changed in [[Special:Preferences]]) * '''session_alt2''' – [[WP:ALT|alternative text]] for ''session_room2'' image * '''meeting_place2''' – second place where it meets: room, building, or city; displayed as caption below ''session_room2'' image * '''website''' – the assembly's/house's official website (Optional); use {{tl|URL}} * '''constitution''' – * '''rules''' – * '''footnotes''' – any necessary footnotes (Optional) == Microformat == {{UF-hcard-org}} == TemplateData == {{TemplateData header}} <templatedata> { "params": { "background_color": {}, "name": {}, "native_name": {}, "native_name_lang": {}, "transcription_name": {}, "legislature": {}, "coa_pic": {}, "coa_res": {}, "coa_alt": {}, "coa_caption": {}, "logo": {}, "logo_pic": {}, "logo_res": {}, "logo_alt": {}, "logo_caption": {}, "labelstyle": {}, "house_type": {}, "houses": {}, "term_limits": {}, "body": {}, "jurisdiction": {}, "chambers": {}, "foundation": {}, "disbanded": {}, "preceded_by": {}, "succeeded_by": {}, "new_session": {}, "established": {}, "leader1": {}, "leader2": {}, "leader3": {}, "leader4": {}, "leader5": {}, "leader6": {}, "leader7": {}, "leader8": {}, "leader1_type": {}, "party1": {}, "election1": {}, "leader1_term": {}, "leader2_type": {}, "party2": {}, "election2": {}, "leader2_term": {}, "leader3_type": {}, "party3": {}, "election3": {}, "leader3_term": {}, "leader4_type": {}, "party4": {}, "election4": {}, "leader4_term": {}, "leader5_type": {}, "party5": {}, "election5": {}, "leader5_term": {}, "leader6_type": {}, "party6": {}, "election6": {}, "leader6_term": {}, "leader7_type": {}, "party7": {}, "election7": {}, "leader7_term": {}, "leader8_type": {}, "party8": {}, "election8": {}, "leader8_term": {}, "leader9_type": {}, "leader9": {}, "party9": {}, "election9": {}, "leader9_term": {}, "leader10_type": {}, "leader10": {}, "party10": {}, "election10": {}, "leader10_term": {}, "structure1": {}, "political_groups1": {}, "structure3": {}, "political_groups3": {}, "committees1": {}, "committees2": {}, "joint_committees": {}, "term_length": {}, "authority": {}, "salary": {}, "seats1": {}, "seats2": {}, "seats3": {}, "seats4": {}, "seats5": {}, "seats6": {}, "seats7": {}, "seats8": {}, "members": {}, "seats": {}, "structure1_res": {}, "structure1_alt": {}, "house1": {}, "structure2": {}, "structure2_res": {}, "structure2_alt": {}, "house2": {}, "political_groups2": {}, "seats1_title": {}, "seats2_title": {}, "seats3_title": {}, "seats4_title": {}, "seats5_title": {}, "seats6_title": {}, "seats7_title": {}, "seats8_title": {}, "seats9_title": {}, "seats9": {}, "seats10_title": {}, "seats10": {}, "voting_system1": {}, "voting_system2": {}, "first_election1": {}, "first_election2": {}, "first_election3": {}, "last_election1": {}, "last_election2": {}, "last_election3": {}, "next_election1": {}, "next_election2": {}, "next_election3": {}, "redistricting": {}, "motto": {}, "session_room": {}, "meeting_place": {}, "session_res": {}, "session_alt": {}, "session_room2": {}, "session_res2": {}, "session_alt2": {}, "meeting_place2": {}, "session_room3": {}, "session_res3": {}, "session_alt3": {}, "meeting_place3": {}, "website": {}, "constitution": {}, "rules": {}, "footnotes": {}, "text_color": {} }, "description": "infobox for legislatures" } </templatedata> ==Tracking category== * {{clc|Infobox legislature with background color}} {{Organization infoboxes}} <includeonly>{{Sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> [[Category:Politics and government infobox templates|Legislature]] }}</includeonly> 98ceef7ef705bd726cfa96490e94a2ffdd1240dc Module:Infobox/doc 828 112 282 2022-03-21T06:32:18Z en>Shkuru Afshar 0 wikitext text/x-wiki {{High-use|3308957|all-pages = yes}} {{module rating|protected}} {{Lua|Module:Navbar}} {{Uses TemplateStyles|Module:Infobox/styles.css}} '''Module:Infobox''' is a [[WP:Module|module]] that implements the {{tl|Infobox}} template. Please see the template page for usage instructions. == Tracking categories == * {{clc|Pages using infobox templates with ignored data cells}} * {{clc|Articles using infobox templates with no data rows}} * {{clc|Pages using embedded infobox templates with the title parameter}} <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| [[Category:Modules that add a tracking category|{{PAGENAME}}]] [[Category:Wikipedia infoboxes]] [[Category:Infobox modules]] [[Category:Modules that check for strip markers‎]] }}</includeonly> fe846798cf7108b8be9eed59be9f70e9627cebc3 Template:Longitem 10 84 220 2022-03-28T00:47:59Z en>Neveselbert 0 +conditional to allow transclusion of default style in other templates wikitext text/x-wiki {{#if:{{{1|}}}|<div style="}} display:inline-block; line-height:1.2em; padding:0.1em 0;{{#if:{{{1|}}}|{{{style|}}}">{{{1}}}</div><includeonly>{{#if:{{{2|}}}|[[Category:Pages using Template:Longitem with unnamed style parameter]]}}</includeonly>}}<noinclude> {{documentation}} </noinclude> 6a40580511715660899f98b06460a45f5a42977b Template:Documentation 10 11 17 2022-03-29T02:14:34Z en>Bsherr 0 consistent with new substitution template format wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> <!-- Add categories to the /doc subpage --> </noinclude> 9e62b964e96c4e3d478edecbfcb3c0338ae8a276 18 17 2022-07-12T15:19:44Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> <!-- Add categories to the /doc subpage --> </noinclude> 9e62b964e96c4e3d478edecbfcb3c0338ae8a276 Module:List 828 53 101 2022-04-03T20:52:25Z en>Wugapodes 0 Changed protection settings for "[[Module:List]]": [[WP:High-risk templates|High-risk Lua module]]: Used in MediaWiki interface ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) Scribunto text/plain -- This module outputs different kinds of lists. At the moment, bulleted, -- unbulleted, horizontal, ordered, and horizontal ordered lists are supported. local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes data.classes = {} if listType == 'horizontal' or listType == 'horizontal_ordered' then table.insert(data.classes, 'hlist hlist-separated') elseif listType == 'unbulleted' then table.insert(data.classes, 'plainlist') end table.insert(data.classes, args.class) -- Main div style data.style = args.style -- Indent for horizontal lists if listType == 'horizontal' or listType == 'horizontal_ordered' then local indent = tonumber(args.indent) indent = indent and indent * 1.6 or 0 if indent > 0 then data.marginLeft = indent .. 'em' end end -- List style types for ordered lists -- This could be "1, 2, 3", "a, b, c", or a number of others. The list style -- type is either set by the "type" attribute or the "list-style-type" CSS -- property. if listType == 'ordered' or listType == 'horizontal_ordered' then data.listStyleType = args.list_style_type or args['list-style-type'] data.type = args['type'] -- Detect invalid type attributes and attempt to convert them to -- list-style-type CSS properties. if data.type and not data.listStyleType and not tostring(data.type):find('^%s*[1AaIi]%s*$') then data.listStyleType = data.type data.type = nil end end -- List tag type if listType == 'ordered' or listType == 'horizontal_ordered' then data.listTag = 'ol' else data.listTag = 'ul' end -- Start number for ordered lists data.start = args.start if listType == 'horizontal_ordered' then -- Apply fix to get start numbers working with horizontal ordered lists. local startNum = tonumber(data.start) if startNum then data.counterReset = 'listitem ' .. tostring(startNum - 1) end end -- List style -- ul_style and ol_style are included for backwards compatibility. No -- distinction is made for ordered or unordered lists. data.listStyle = args.list_style -- List items -- li_style is included for backwards compatibility. item_style was included -- to be easier to understand for non-coders. data.itemStyle = args.item_style or args.li_style data.items = {} for i, num in ipairs(mTableTools.numKeys(args)) do local item = {} item.content = args[num] item.style = args['item' .. tostring(num) .. '_style'] or args['item_style' .. tostring(num)] item.value = args['item' .. tostring(num) .. '_value'] or args['item_value' .. tostring(num)] table.insert(data.items, item) end return data end function p.renderList(data) -- Renders the list HTML. -- Return the blank string if there are no list items. if type(data.items) ~= 'table' or #data.items < 1 then return '' end -- Render the main div tag. local root = mw.html.create('div') for i, class in ipairs(data.classes or {}) do root:addClass(class) end root:css{['margin-left'] = data.marginLeft} if data.style then root:cssText(data.style) end -- Render the list tag. local list = root:tag(data.listTag or 'ul') list :attr{start = data.start, type = data.type} :css{ ['counter-reset'] = data.counterReset, ['list-style-type'] = data.listStyleType } if data.listStyle then list:cssText(data.listStyle) end -- Render the list items for i, t in ipairs(data.items or {}) do local item = list:tag('li') if data.itemStyle then item:cssText(data.itemStyle) end if t.style then item:cssText(t.style) end item :attr{value = t.value} :wikitext(t.content) end return tostring(root) end function p.renderTrackingCategories(args) local isDeprecated = false -- Tracks deprecated parameters. for k, v in pairs(args) do k = tostring(k) if k:find('^item_style%d+$') or k:find('^item_value%d+$') then isDeprecated = true break end end local ret = '' if isDeprecated then ret = ret .. '[[Category:List templates with deprecated parameters]]' end return ret end function p.makeList(listType, args) if not listType or not listTypes[listType] then error(string.format( "bad argument #1 to 'makeList' ('%s' is not a valid list type)", tostring(listType) ), 2) end checkType('makeList', 2, args, 'table') local data = p.makeListData(listType, args) local list = p.renderList(data) local trackingCategories = p.renderTrackingCategories(args) return list .. trackingCategories end for listType in pairs(listTypes) do p[listType] = function (frame) local mArguments = require('Module:Arguments') local origArgs = mArguments.getArgs(frame, { valueFunc = function (key, value) if not value or not mw.ustring.find(value, '%S') then return nil end if mw.ustring.find(value, '^%s*[%*#;:]') then return value else return value:match('^%s*(.-)%s*$') end return nil end }) -- Copy all the arguments to a new table, for faster indexing. local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.makeList(listType, args) end end return p 0d6c114450d0f5b3c1d2171ebeb41ae74f203f88 Template:If empty 10 15 25 2022-04-03T20:56:41Z en>Wugapodes 0 Changed protection settings for "[[Template:If empty]]": [[WP:High-risk templates|Highly visible template]]: used on 2 million pages and permanently cascade protected; matches module protection ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:If empty|main}}<noinclude>{{Documentation}}</noinclude> 745940b7bdde8a1585c887ee4ee5ce81d98461a4 Template:Country data Uruguay 10 156 374 2022-04-17T17:26:45Z wikipedia>Paine Ellsworth 0 per edit request on talk page - include flag alias for army wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Uruguay | flag alias = Flag of Uruguay.svg | flag alias-1828 = Flag of Uruguay (1828-1830).svg | link alias-naval = National Navy of Uruguay | flag alias-army = Flag of Uruguayan Army.jpg | link alias-army = National Army (Uruguay){{!}}National Army of Uruguay | link alias-air force = Uruguayan Air Force | flag alias-air force = Flag of the Uruguayan Air Force.svg | link alias-navy = National Navy of Uruguay | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1828 | redir1 = URY | redir2 = URU </noinclude> }} cf68443db5f78b4a215460b9f4bd07a4d1e57e99 Module:If empty 828 49 93 2022-05-06T04:38:40Z en>Dinoguy1000 0 update from sandbox, per [[Template talk:If empty#Backcompat]] Scribunto text/plain local p = {} function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false}) local lastk = 0 for k,v in ipairs(args) do if v ~= '' then return v end lastk = k end end return p 4bfc0c7c8bf3b63144db1ea12f2260db00421233 Template:Infobox legislation/doc 10 18 31 2022-05-16T04:19:10Z en>Pizza1016 0 reorder wikitext text/x-wiki {{Documentation subpage}} {{Lua|Module:InfoboxImage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> == Usage == {{Parameter names example |short_title |legislature |image |imagesize |image_upright |imagealt |caption |long_title |citation |territorial_extent |considered_by |enacted_by |date_enacted |date_passed |considered_by2 |enacted_by2 |date_enacted2 |date_passed2 |date_assented |royal_assent |assented_by |date_signed |signed_by |date_vetoed |vetoed_by |veto_type |veto_overridden |reference_holding |date_pocket_vetoed |date_became_law_by_inaction |date_commenced |date_effective |date_of_expiry |date_repealed |administered_by |bill |bill_citation |bill_date |introduced_by |1st_reading |2nd_reading |committee_whole |3rd_reading |conf_committee_passed |committee_report |bill2 |bill_citation2 |bill_date2 |introduced_by2 |1st_reading2 |2nd_reading2 |committee_whole2 |3rd_reading2 |conf_committee_passed2 |committee_report2 |date_conf_committee |white_paper |date_amendments_considered |date_final_passage |amends |repeals |amended_by |repealed_by |related_legislation |summary |keywords |status }} This template summarizes information about a piece of [[legislation]] or a [[bill (law)|bill]]. It is designed to be generic so that it can be used for the bills, [[statute]]s and subsidiary legislation ([[delegated legislation]]) of any [[jurisdiction]]. If you have suggestions as to how the template may be improved, please leave a message on the [[Template talk:Infobox legislation|talk page]]. Specific infoboxes for European Union, United Kingdom (national and devolved) and United States (federal only) legislation are at {{tl|Infobox EU legislation}}, {{tl|Infobox UK legislation}} and {{tl|Infobox U.S. legislation}} respectively (although this template also supports the latter two to a limited extent). ===Legislation enacted by a legislature (e.g. an Act of Parliament/Congress)=== See next section for bills that did not pass or is still being considered by the legislature. {{Hidden begin|title=Click [show] to view}} <pre style="overflow:auto"> {{Infobox legislation |short_title = |legislature = <!-- Name of enacting legislature, wikilinked. Autofills image if available. --> |image = |imagesize = |image_upright = |imagealt = |caption = |long_title = |citation = |territorial_extent = |enacted_by = <!-- For bicameral legislatures, this is the chamber the bill was first introduced. --> |date_enacted = <!-- Pick one of date_enacted or date_passed as appropriate in jurisdiction. --> |date_passed = <!-- Pick one of date_enacted or date_passed as appropriate in jurisdiction. --> |enacted_by2 = <!-- For bicameral legislatures only. Use if bill passed the second chamber. --> |date_enacted2 = <!-- For bicameral legislatures only. Pick one of date_enacted2 or date_passed2 as appropriate in jurisdiction. --> |date_passed2 = <!-- For bicameral legislatures only. Pick one of date_enacted2 or date_passed2 as appropriate in jurisdiction. --> |date_assented = <!-- Pick none or one of date_assented, royal_assent or date_signed as appropriate in jurisdiction. --> |assented_by = <!-- Only use if date_assented or royal_assent is used. --> |royal_assent = <!-- Pick none or one of date_assented, royal_assent or date_signed as appropriate in jurisdiction. --> |date_signed = <!-- Pick none or one of date_assented, royal_assent or date_signed as appropriate in jurisdiction. --> |signed_by = <!-- Only use if date_signed is used. --> <-- Use date_vetoed, vetoed_by, veto_type, veto_overridden, and reference_holding if bill was vetoed but the veto was overridden, or, for constitutional vetoes, the constitutional court held that the bill is constitutional. --> |date_vetoed = <!-- For jurisdiction where a veto is used. --> |vetoed_by = <!-- Only use if date_vetoed is used. --> |veto_type = <!-- Only use if the jurisdiction allows for several types of veto, e.g. returning a bill to the legislature or referring it to a constitutional court. Pocket vetoes should not be placed here. --> |veto_overridden = <!-- Date on which the veto was overridden. Pocket vetoes and constitutional vetoes should not be placed here; however, if the veto results in a referendum on the bill, the date of that referendum should be here, with a wiki link where possible. --> |reference_holding = <!-- For jurisdictions where a constitutional veto (a bill is referred to the supreme or constitutional court) is used. The holding of the court as to the constitutionality of a bill; wikilink or external link to the ruling where possible. --> |date_became_law_by_inaction = <!-- For jurisdiction where a pocket approval is used (e.g. if no action is taken on a bill after it is presented to the head of state, it becomes law automatically). --> |date_commenced = <!-- Pick one of date_commenced or date_effective as appropriate in jurisdiction. --> |date_effective = <!-- Pick one of date_commenced or date_effective as appropriate in jurisdiction. --> |date_of_expiry = |date_repealed = |administered_by = |bill = <!-- Name of relevant bill debated in the chamber listed in enacted_by or considered_by. Omit if the legislation is still a bill in this chamber and the bill name used in short_title. --> |bill_citation = |bill_date = |introduced_by = <!-- Name of member introducing the bill in the chamber. --> |1st_reading = |2nd_reading = <!-- Specify date range for multi-day readings. --> |committee_whole_label = |committee_whole = |3rd_reading = |conf_committee_passed = |committee_report = |bill2 = <!-- For bicameral legislatures only. Name of relevant bill debated in the chamber listed in enacted_by2 or considered_by2. --> |bill_citation2 = <!-- For bicameral legislatures only. --> |bill_date2 = <!-- For bicameral legislatures only. --> |introduced_by2 = <!-- For bicameral legislatures only. Name of member introducing the bill in the chamber. --> |1st_reading2 = <!-- For bicameral legislatures only. --> |2nd_reading2 = <!-- For bicameral legislatures only. Specify date range for multi-day readings. --> |committee_whole_label2 = <!-- For bicameral legislatures only. --> |committee_whole2 = <!-- For bicameral legislatures only. --> |3rd_reading2 = <!-- For bicameral legislatures only. --> |conf_committee_passed2 = <!-- For bicameral legislatures only. --> |committee_report2 = <!-- For bicameral legislatures only. --> |date_conf_committee = |white_paper = |date_amendments_considered = <!-- For bicameral legislatures only. --> |date_final_passage = <!-- For bicameral legislatures only. --> |amends = <!-- Citations of other notable legislation that this legislation amends; wikilink or external link where possible. --> |repeals = <!-- Citations of other notable legislation that this legislation repeals; wikilink or external link where possible. --> |amended_by = <!-- Citations of other notable legislation that amends this legislation; wikilink or external link where possible. --> |repealed_by = <!-- Citation of the legislation that repealed this legislation; wikilink or external link if possible. --> |related_legislation = <!-- Names and citations of any other related legislation; wikilink name and external link citation where possible. --> |summary = |keywords = |status = <!-- not yet in force/not fully in force/current/in force/amended/expired/spent/repealed/struck down/halted/void/void ab initio --> }} </pre> {{Hidden end}} ===Proposed legislation considered (but failed) or in consideration by a legislature (e.g. a bill)=== {{Hidden begin|title=Click [show] to view}} <pre style="overflow:auto"> {{Infobox legislation |short_title = <!-- Name of bill. --> |legislature = <!-- Name of considering legislature, wikilinked. Autofills image if available. --> |image = |imagesize = |image_upright = |imagealt = |caption = |long_title = |citation = <!-- Citation of bill. --> |territorial_extent = |considered_by = <!-- Use if bill did not pass or hasn't been passed by the chamber (for bicameral legislatures, this is the chamber the bill was first introduced). --> |enacted_by = <!-- Use if bill passed the chamber but was vetoed or have not yet received assent, or, for bicameral legislatures, did not pass or have not yet passed the second chamber. --> |date_enacted = <!-- Pick one of date_enacted or date_passed as appropriate in jurisdiction. Only use if enacted_by is used. --> |date_passed = <!-- Pick one of date_enacted or date_passed as appropriate in jurisdiction. Only use if enacted_by is used. --> |considered_by2 = <!-- For bicameral legislatures only. Use if bill did not pass or hasn't been passed by the second chamber. --> |enacted_by2 = <!-- For bicameral legislatures only. Use if bill passed the second chamber but was vetoed or have not yet received assent. --> |date_enacted2 = <!-- For bicameral legislatures only. Pick one of date_enacted2 or date_passed2 as appropriate in jurisdiction. Only use if enacted_by2 is used. --> |date_passed2 = <!-- For bicameral legislatures only. Pick one of date_enacted2 or date_passed2 as appropriate in jurisdiction. Only use if enacted_by2 is used. --> |date_vetoed = <!-- For jurisdiction where a veto is used. --> |vetoed_by = <!-- Only use if date_vetoed is used. --> |veto_type = <!-- Only use if the jurisdiction allows for several types of veto, e.g. returning a bill to the legislature or referring it to a constitutional court. Pocket vetoes should not be placed here. --> |reference_holding = <!-- For jurisdictions where a constitutional veto (a bill is referred to the supreme or constitutional court) is used. The holding of the court as to the constitutionality of a bill; wikilink or external link to the ruling where possible. --> |date_pocket_vetoed = <!-- For jurisdiction where a pocket veto is used (e.g. if no action is taken on a bill after it is presented to the head of state, it is killed automatically). --> |bill = <!-- Name of relevant bill debated in the chamber listed in enacted_by or considered_by. Omit if the legislation is still a bill in this chamber and the bill name used in short_title. --> |bill_citation = |bill_date = |introduced_by = <!-- Name of member introducing the bill in the chamber. --> |1st_reading = |2nd_reading = <!-- Specify date range for multi-day readings. --> |committee_whole_label = |committee_whole = |3rd_reading = |conf_committee_passed = |committee_report = |bill2 = <!-- For bicameral legislatures only. Name of relevant bill debated in the chamber listed in enacted_by2 or considered_by2. --> |bill_citation2 = <!-- For bicameral legislatures only. --> |bill_date2 = <!-- For bicameral legislatures only. --> |introduced_by2 = <!-- For bicameral legislatures only. Name of member introducing the bill in the chamber. --> |1st_reading2 = <!-- For bicameral legislatures only. --> |2nd_reading2 = <!-- For bicameral legislatures only. Specify date range for multi-day readings. --> |committee_whole_label2 = <!-- For bicameral legislatures only. --> |committee_whole2 = <!-- For bicameral legislatures only. --> |3rd_reading2 = <!-- For bicameral legislatures only. --> |conf_committee_passed2 = <!-- For bicameral legislatures only. --> |committee_report2 = <!-- For bicameral legislatures only. --> |date_conf_committee = |white_paper = |date_amendments_considered = <!-- For bicameral legislatures only. --> |date_final_passage = <!-- For bicameral legislatures only. --> |amends = <!-- Citations of other notable legislation that this legislation amends; wikilink or external link where possible. --> |repeals = <!-- Citations of other notable legislation that this legislation repeals; wikilink or external link where possible. --> |related_legislation = <!-- Names and citations of any other related legislation; wikilink name and external link citation where possible. --> |summary = |keywords = |status = <!-- pending/not passed/vetoed/withdrawn/blocked --> }} </pre> {{Hidden end}} ===Legislation enacted or considered without going through a legislature (e.g. a regulation or an order)=== {{Hidden begin|title=Click [show] to view}} <pre style="overflow:auto"> {{Infobox legislation |short_title = |legislature = <!-- Name of considering or enacting body (e.g. Government of Australia), wikilinked. --> |image = |imagesize = |image_upright = |imagealt = |caption = |long_title = |citation = |territorial_extent = |considered_by = <!-- Name of considering authority. Use if legislation wasn't enacted for some reason, or if it is still being considered. --> |enacted_by = <!-- Name of enacting authority. Use if legislation was enacted. --> |date_enacted = <!-- Pick one of date_enacted or date_passed as appropriate in jurisdiction. Only use if enacted_by is used. --> |date_passed = <!-- Pick one of date_enacted or date_passed as appropriate in jurisdiction. Only use if enacted_by is used. --> |date_assented = <!-- Pick none or one of date_assented, royal_assent or date_signed as appropriate in jurisdiction. --> |royal_assent = <!-- Pick none or one of date_assented, royal_assent or date_signed as appropriate in jurisdiction. --> |date_signed = <!-- Pick none or one of date_assented, royal_assent or date_signed as appropriate in jurisdiction. --> |signed_by = <!-- Only use if date_signed is used. --> |date_commenced = <!-- Pick one of date_commenced or date_effective as appropriate in jurisdiction. --> |date_effective = <!-- Pick one of date_commenced or date_effective as appropriate in jurisdiction. --> |date_of_expiry = |date_repealed = |administered_by = |white_paper = |amends = <!-- Citations of other notable legislation that this legislation amends; wikilink or external link where possible. --> |repeals = <!-- Citations of other notable legislation that this legislation repeals; wikilink or external link where possible. --> |amended_by = <!-- Citations of other notable legislation that amends this legislation; wikilink or external link where possible. --> |repealed_by = <!-- Citation of the legislation that repealed this legislation; wikilink or external link if possible. --> |related_legislation = <!-- Names and citations of any other related legislation; wikilink name and external link citation where possible. --> |summary = |keywords = |status = <!-- pending/withdrawn/blocked/not yet in force/not fully in force/current/in force/amended/expired/spent/repealed/struck down/halted/void/void ab initio --> }} </pre> {{Hidden end}} ===All available parameters=== {{Hidden begin||title=Click [show] to view}} <pre style="overflow:auto"> {{Infobox legislation |short_title = |legislature = <!-- Name of enacting legislature, wikilinked. Autofills image if available. --> |image = |imagesize = |image_upright = |imagealt = |caption = |long_title = |citation = |territorial_extent = |considered_by = <!-- Use if bill did not pass or hasn't been passed by the chamber (for bicameral legislatures, this is the chamber the bill was first introduced). --> |enacted_by = <!-- Use if bill passed the chamber (for bicameral legislatures, this is the chamber the bill was first introduced). --> |date_enacted = <!-- Pick one of date_enacted or date_passed as appropriate in jurisdiction. Only use if enacted_by is used. --> |date_passed = <!-- Pick one of date_enacted or date_passed as appropriate in jurisdiction. Only use if enacted_by is used. --> |considered_by2 = <!-- For bicameral legislatures only. Use if bill did not pass or hasn't been passed by the second chamber. --> |enacted_by2 = <!-- For bicameral legislatures only. Use if bill passed the second chamber. --> |date_enacted2 = <!-- For bicameral legislatures only. Pick one of date_enacted2 or date_passed2 as appropriate in jurisdiction. Only use if enacted_by2 is used. --> |date_passed2 = <!-- For bicameral legislatures only. Pick one of date_enacted2 or date_passed2 as appropriate in jurisdiction. Only use if enacted_by2 is used. --> |date_assented = <!-- Pick none or one of date_assented, royal_assent or date_signed as appropriate in jurisdiction. --> |assented_by = <!-- Only use if date_assented or royal_assent is used. --> |royal_assent = <!-- Pick none or one of date_assented, royal_assent or date_signed as appropriate in jurisdiction. --> |date_signed = <!-- Pick none or one of date_assented, royal_assent or date_signed as appropriate in jurisdiction. --> |signed_by = <!-- Only use if date_signed is used. --> |date_vetoed = <!-- For jurisdiction where a veto is used. --> |vetoed_by = <!-- Only use if date_vetoed is used. --> |veto_type = <!-- Only use if the jurisdiction allows for several types of veto, e.g. returning a bill to the legislature or referring it to a constitutional court. Pocket vetoes should not be placed here. --> |veto_overridden = <!-- Date on which the veto was overridden. Pocket vetoes and constitutional vetoes should not be placed here; however, if the veto results in a referendum on the bill, the date of that referendum should be here, with a wiki link where possible. --> |reference_holding = <!-- For jurisdictions where a constitutional veto (a bill is referred to the supreme or constitutional court) is used. The holding of the court as to the constitutionality of a bill; wikilink or external link to the ruling where possible. --> |date_pocket_vetoed = <!-- For jurisdiction where a pocket veto is used (e.g. if no action is taken on a bill after it is presented to the head of state, it is killed automatically). --> |date_became_law_by_inaction = <!-- For jurisdiction where a pocket approval is used (e.g. if no action is taken on a bill after it is presented to the head of state, it becomes law automatically). --> |date_commenced = <!-- Pick one of date_commenced or date_effective as appropriate in jurisdiction. --> |date_effective = <!-- Pick one of date_commenced or date_effective as appropriate in jurisdiction. --> |date_of_expiry = |date_repealed = |administered_by = |bill = <!-- Name of relevant bill debated in the chamber listed in enacted_by or considered_by. Omit if the legislation is still a bill in this chamber and the bill name used in short_title. --> |bill_citation = |bill_date = |introduced_by = <!-- Name of member introducing the bill in the chamber. --> |1st_reading = |2nd_reading = |committee_whole_label = |committee_whole = |3rd_reading = |conf_committee_passed = |committee_report = |bill2 = <!-- For bicameral legislatures only. Name of relevant bill debated in the chamber listed in enacted_by2 or considered_by2. --> |bill_citation2 = <!-- For bicameral legislatures only. --> |bill_date2 = <!-- For bicameral legislatures only. --> |introduced_by2 = <!-- For bicameral legislatures only. Name of member introducing the bill in the chamber. --> |1st_reading2 = <!-- For bicameral legislatures only. --> |2nd_reading2 = <!-- For bicameral legislatures only. --> |committee_whole_label2 = <!-- For bicameral legislatures only. --> |committee_whole2 = <!-- For bicameral legislatures only. --> |3rd_reading2 = <!-- For bicameral legislatures only. --> |conf_committee_passed2 = <!-- For bicameral legislatures only. --> |committee_report2 = <!-- For bicameral legislatures only. --> |date_conf_committee = |white_paper = |date_amendments_considered = <!-- For bicameral legislatures only. --> |date_final_passage = <!-- For bicameral legislatures only. --> |amends = <!-- Citations of other notable legislation that this legislation amends; wikilink or external link where possible. --> |repeals = <!-- Citations of other notable legislation that this legislation repeals; wikilink or external link where possible. --> |amended_by = <!-- Citations of other notable legislation that amends this legislation; wikilink or external link where possible. --> |repealed_by = <!-- Citation of the legislation that repealed this legislation; wikilink or external link if possible. --> |related_legislation = <!-- Names and citations of any other related legislation; wikilink name and external link citation where possible. --> |summary = |keywords = |status = <!-- pending/not passed/vetoed/withdrawn/blocked/not yet in force/not fully in force/current/in force/amended/expired/spent/repealed/struck down/halted/void/void ab initio --> }} </pre> {{Hidden end}} ==Parameters== This infobox takes a number of parameters, which are all optional: {|class="wikitable" |- !Parameter !Description |- |colspan="2" bgcolor="silver"|'''Basic information''' |- | style="text-align:center;" |'''short_title''' |The [[short title]] of the legislation or bill, which should preferably be the same as the article title. If the parameter is left blank or omitted, the article name is used. |- | style="text-align:center;" |'''legislature''' |The name of the [[legislature]] that enacted the legislation. You only need to use this parameter if the legislature of the jurisdiction in question is [[bicameralism|bicameral]], and you wish to state its name rather than just the names of the [[upper house]] and [[lower house]], which can be specified using {{para|enacted_by}} and {{para|enacted_by2}}. |- | style="text-align:center;" |'''image''' |An image to represent the person or institution that enacted the legislation, such as a [[coat of arms]], a [[seal (emblem)|seal]] or a photograph of a building. Type the name of the image without the "{{mono|File:}}" prefix and do not [[Help:Link|wikilink]] it. If you omit this parameter, the template automatically displays an image according to the scheme at {{tl|Infobox legislation/images}}. |- | style="text-align:center;" |'''imagesize''' |The width of the image in [[pixel]]s (px), particularly if it is less than 180 px. Type the number without the "px" suffix ("{{mono|150}}", not "{{mono|150px}}"). If this parameter is left blank or omitted, the image size defaults to 180 px. |- | style="text-align:center;" |'''image_upright''' |Scale factor for the image, particularly to scale tall, narrow images correctly. See [[Help:Pictures#Upright_images]] for more information. |- | style="text-align:center;" |'''imagealt''' |[[Wikipedia:Extended image syntax#Alt text and caption|Alt text]] for the image. For more information, see "[[Wikipedia:Alternative text for images]]". |- | style="text-align:center;" |'''caption''' |A caption for the image. Terms in the caption can be wikilinked, if desired. |- | style="text-align:center;" |'''long_title''' |The [[long title]] of the legislation. |- | style="text-align:center;" |'''citation''' |The citation of the legislation. If the legislation is available online, use a [[:Category:Law citation templates|citation template]] where available to generate an external link automatically, or else [[Help:Link#External links|create a link manually]]. If the citation uses square brackets, replace them with {{mono|&amp;#91;}} and {{mono|&amp;#93;}} when putting them inside an external link. |- | style="text-align:center;" |'''territorial_extent''' |The territorial area(s) to which the legislation extends or applies. If possible, provide a wikilink. |- | style="text-align:center;" |'''considered_by<br />enacted_by''' |The name of the person or institution that considered or enacted the legislation. {{para|considered_by}} is used for proposed or failed legislation (e.g. bills) in which the institution did not or has not enacted the legislation, and {{para|enacted_by}} for successful ones. Wikilink the name to a Wikipedia article about the person or institution, if there is one. In a bicameral jurisdiction, use this parameter to specify the legislative chamber that initiated the legislation. |- | style="text-align:center;" |'''date_enacted<br />date_passed''' |The date the legislation was enacted or passed. Select either {{para|date_enacted}} or {{para|date_passed}} depending on whether the term ''enacted'' or ''passed'' is customarily used in the jurisdiction. In line with "[[Wikipedia:Manual of Style (dates and numbers)#Linking and autoformatting of dates]]", do not wikilink dates. |- | style="text-align:center;" |'''considered_by2<br />enacted_by2<br />date_enacted2<br />date_passed2''' |In a bicameral legislature, use these parameters to specify the name of the legislative chamber that considered the legislation after it was initiated by the other chamber, and the date when the second chamber enacted or passed the legislation. |- | style="text-align:center;" |'''date_assented<br />royal_assent<br />date_signed''' |Use one of the following: #{{para|date_assented}} – to indicate the date when a [[head of state]] or their representative gives formal assent to the legislation. #{{para|royal_assent}} – to indicate the date when a [[constitutional monarchy|constitutional monarch]] gives [[royal assent]] to legislation. #{{para|date_signed}} – to indicate the date when a president (''e.g.'', the [[President of the United States]]) a state governor (''e.g.'', the [[governor (United States)|governor of one of the US states]]) or a [[constitutional monarchy|constitutional monarch]] without royal assent powers (''e.g.'', the [[Grand Duke of Luxembourg]]), signs a piece of legislation, and the signer's identity. Do not use parameter(s) from two or three of the above categories together. |- | style="text-align:center;" |'''assented_by<br />signed_by''' |Use one of the following: #{{para|assented_by}} – to indicate the assenter's identity where {{para|date_assented}} or {{para|royal_assent}} is used. #{{para|signed_by}} – to indicate the signer's identity where {{para|date_signed}} is used. Do not use parameter(s) from two of the above categories together. |- | style="text-align:center;" |'''date_vetoed''' |The date when the legislation was [[vetoed]] by the [[head of state]] or their representative. This does not apply to a [[pocket veto]]. |- | style="text-align:center;" |'''veto_type''' |The type of veto applied to the law, if the [[head of state]] or their representative has the right to veto the bill in multiple ways. This does not apply to a [[pocket veto]]. Use one of the following: #Absolute – to indicate a veto which cannot be overridden (''e.g.'', withholding of royal assent by the [[Monarch of the United Kingdom]], or a final veto by the [[President of Cyprus]]). #Package – to indicate a veto where the entire bill is returned to the legislature for reconsideration. #Line-item – to indicate a veto where only a part of the bill is returned to the legislature for reconsideration. #Referendum – to indicate a veto where the bill is submitted to a referendum (''e.g.'', a reservation of the bill to the significance of the people by the [[President of Ireland]]). #Constitutional – to indicate a veto where the bill is referred to the supreme or constitutional court, or other authority with [[judicial review]] powers, to determine its constitutionality. |- | style="text-align:center;" |'''veto_overridden''' |The date when the veto was [[veto override|overridden]]: #If the veto involves returning the bill to the legislature, this is the date of the legislative vote to override the veto. If the legislative debates are available online, create external links to them. #If the veto involves submitting the bill to a referendum, this is the date of the referendum on that bill. Create an internal link to that Referendum's article. This does not apply to a [[pocket veto]] or a constitutional veto. |- | style="text-align:center;" |'''reference_holding''' |The decision of the supreme or constitutional court, or other authority with [[judicial review]] powers, on a vetoed bill referred to it. Create an internal link to the court ruling's article; if no such article exists but the court's decision is available online, create an external link to it. |- | style="text-align:center;" |'''date_pocket_vetoed''' |The date when the legislation was [[pocket veto]]ed by the [[head of state]] or their representative (''i.e.'' the bill became ineffective because the head of state or representative did not sign/assent or veto it within an allowed time) |- | style="text-align:center;" |'''date_became_law_by_inaction''' |The date when the legislation bill became law because the head of state or representative did not sign/assent or veto it within an allowed time. |- | style="text-align:center;" |'''date_commenced'''<br />'''date_effective''' |The date when the legislation commenced ([[coming into force|came into force]]), or [[effective date|became effective]] as law. Use the parameter that corresponds to the term customary in the jurisdiction, not both the parameters. |- | style="text-align:center;" |'''date_of_expiry''' |Date when the legislation automatically ceases to have effect (usually, but not always, when a [[Sunset clause|sunset provision]] is included). |- | style="text-align:center;" |'''date_repealed''' |Date when the legislation is repealed. Note that legislation may be repealed before or after it had expired, so this parameter is not necessarily identical to {{para|date_of_expiry}}. |- | style="text-align:center;" |'''administered_by''' |The institution administering the legislation. Not necessary for most legislation. Wikilink if possible. |- |colspan="2" bgcolor="silver"|'''Legislation history''' |- | style="text-align:center;" |'''bill''' |The name of the [[bill (law)|bill]] or proposed law when the legislation was still being considered by the institution specified in {{para|enacted_by}} or {{para|considered_by}}. Wikilink the name to an article about the bill, if there is one. In a bicameral jurisdiction, use this parameter to state the name of the bill that was introduced by the legislative chamber that initiated the legislation. |- | style="text-align:center;" |'''bill_citation''' |The citation of the bill. If the bill is available online, create an external link to it. If the citation uses square brackets, replace them with {{mono|&amp;#91;}} and {{mono|&amp;#93;}} when putting them inside an external link. |- | style="text-align:center;" |'''bill_date''' |The date when the bill was published. |- | style="text-align:center;" |'''introduced_by''' |The name of the legislator who introduced the bill. |- | style="text-align:center;" |'''1st_reading<br />2nd_reading<br />3rd_reading''' |The dates of the [[reading (legislature)#First reading|first]], [[reading (legislature)#Second reading|second]] and [[reading (legislature)#Third reading|third readings]] of the bill in the legislature. If the legislative debates are available online, create external links to them. |- | style="text-align:center;" |'''committee_whole_label<br />committee_whole''' |The name of the stage between the second and third readings where the bill is examined in detail (usually clause by clause), and the date(s) when it occurred. This is often named the "[[committee of the whole]]" (default), or sometimes the "committee stage" (Ireland, New Zealand) or "consideration in detail" (most lower houses of the bicameral parliaments in Australia). Omit if the stage was skipped (e.g. if no amendments were proposed or the chamber voted to skipped). |- | style="text-align:center;" |'''conf_committee_passed''' |In some jurisdictions, the date when the institution passed the version of the bill adopted by a [[conference committee]]. |- | style="text-align:center;" |'''committee_report''' |The name of a report issued by a legislative committee about the bill that was eventually enacted. If the report is available online, create an external link to it. |- | style="text-align:center;" |'''bill2<br />bill_citation2<br />bill_date2<br />introduced_by2<br />1st_reading2<br />2nd_reading2<br />committee_whole_label2<br />committee_whole2<br />3rd_reading2<br />conf_committee_passed2<br />committee_report2''' |In a bicameral legislature, use these parameters to specify information about the bill that was considered in one chamber after it was passed by the other chamber. |- | style="text-align:center;" |'''date_conf_committee''' |In some jurisdictions, the date when a conference committee passed a bill. This parameter should be used together with {{para|conf_committee_passed}} and {{para|conf_committee_passed2}} – use these parameters to indicate the dates when the upper and lower legislative chambers passed the version of the bill adopted by the conference committee. |- | style="text-align:center;" |'''white_paper''' |The name of a [[white paper#Government white papers|white paper]] relating to the legislation. If the white paper is available online, create an external link to it. |- | style="text-align:center;" |'''date_amendments_considered''' |In bicameral legislatures, if amendments were made to the bill by the second chamber, the date(s) when these amendments were considered by the originating chamber. |- | style="text-align:center;" |'''date_final_passage''' |In bicameral legislatures, the date when all amendments to the bill have been ultimately considered and the bill has finally passed both chambers. |- | style="text-align:center;" |'''amends''' |The citations of any notable legislation that this legislation amends. If available, wikilink the article or external link the texts of the amended legislation. |- | style="text-align:center;" |'''repeals''' |The citations of any notable legislation that this legislation repeals. If available, wikilink the article or external link the texts of the repealed legislation. |- | style="text-align:center;" |'''amended_by''' |The citations of any notable amendments to this legislation. If available, wikilink the article or external link the texts of the amendments. |- | style="text-align:center;" |'''repealed_by''' |The citations of any notable legislation repealing parts or previous versions of this legislation. If available, wikilink the article or external link the texts of the repealing legislation. |- | style="text-align:center;" |'''related_legislation''' |The names and citations of any related pieces of legislation. Where possible, link the name of a related piece of legislation to a Wikipedia article about it, and link the citation to an external website containing the text of the related legislation. |- | style="text-align:center;" |'''summary''' |A very brief summary of the subjects that the legislation deals with. |- | style="text-align:center;" |'''keywords''' |A list of [[index term|keywords]] that describe the legal issues dealt with by the legislation. List keywords alphabetically, separate them with commas, and link them to appropriate Wikipedia articles wherever possible; for example, "{{mono|<nowiki>[[Bailment]], [[common carrier]], [[negligence]], [[strict liability]]</nowiki>}}". |- |colspan="2" bgcolor="silver"|'''Status''' |- | style="text-align:center;" |'''status''' |The status of the bill or legislation. The possible values are: {| |- | *pending *not passed *vetoed *current *not yet in force *not fully in force *halted *in force | *amended *expired *repealed *spent *struck down *void *void ab initio |} If some value other than the ones above is given to {{para|status}}, "Unknown" is displayed. |} ==Examples== ===Statute=== {{Infobox legislation |short_title = Criminal Law (Temporary Provisions) Act |long_title = An Act to make temporary provisions for the maintenance of public order, the control of supplies by sea to Singapore, and the prevention of strikes and lock-outs in essential services |citation = Ordinance No. 26 of 1955, now {{Singapore legislation|cap=67|ed=2000}} |territorial_extent = Whole of [[Singapore]] |enacted_by = [[Legislative Assembly of Singapore]] |date_enacted = 22 September 1955 |date_commenced = 21 October 1955 |bill_date = 31 August 1955 |introduced_by = Chief Secretary [[William Allmond Codrington Goode]] |1st_reading = 18 August 1955 |2nd_reading = 22 September 1955 |3rd_reading = 22 September 1955 |status = in force }} <pre style="overflow:auto"> {{Infobox legislation |short_title = Criminal Law (Temporary Provisions) Act |long_title = An Act to make temporary provisions for the maintenance of public order, the control of supplies by sea to Singapore, and the prevention of strikes and lock-outs in essential services |citation = Ordinance No. 26 of 1955, now {{Singapore legislation|cap=67|ed=2000}} |territorial_extent = Whole of [[Singapore]] |enacted_by = [[Legislative Assembly of Singapore]] |date_enacted = 22 September 1955 |date_commenced = 21 October 1955 |bill_date = 31 August 1955 |introduced_by = Chief Secretary [[William Allmond Codrington Goode]] |1st_reading = 18 August 1955 |2nd_reading = 22 September 1955 |3rd_reading = 22 September 1955 |status = in force }} </pre> {{clear}} ===Statute made after overridden veto=== {{Infobox legislation |short_title = Law of Ukraine "On Administrative Procedure" |long_title = |legislature = [[Verkhovna Rada]] |passed_by = [[Verkhovna Rada]] |introduced_by = Prime Minister [[Denys Shmyhal]] |vetoed_by = President [[Volodymyr Zelenskyy]] |1st_reading = 2 September 2020 |2nd_reading = 15 November 2021 |date_vetoed = 8 December 2021 |veto_overridden = 17 February 2022 |status = in force }} <pre style="overflow:auto"> {{Infobox legislation |short_title = Law of Ukraine "On Administrative Procedure" |long_title = |passed_by = [[Verkhovna Rada]] |introduced_by = Prime Minister [[Denys Shmyhal]] |vetoed_by = President [[Volodymyr Zelenskyy]] |1st_reading = 2 September 2020 |2nd_reading = 15 November 2021 |date_vetoed = 8 December 2021 |veto_overridden = 17 February 2022 |status = in force }} </pre> {{clear}} ===Unpassed Bill=== {{Infobox legislation |short_title = Naval Aid Bill |long_title = An Act to authorize measures for increasing the effective naval forces of the Empire. |considered_by = [[Parliament of Canada]] |introduced_by = [[Robert Borden]] |1st_reading = December 5, 1912 |3rd_reading = May 15, 1913 |status = Not passed }} <pre style="overflow:auto"> {{Infobox legislation |short_title = Naval Aid Bill |long_title = An Act to authorize measures for increasing the effective naval forces of the Empire. |considered_by = [[Parliament of Canada]] |introduced_by = [[Robert Borden]] |1st_reading = December 5, 1912 |3rd_reading = May 15, 1913 |status = Not passed }} </pre> {{clear}} ==Technical information== {{Mbox|text=This section contains technical information to assist editors familiar with templates and [[:mw:Help:Extension:ParserFunctions|parser functions]] to edit this template.}} The {{para|image}} parameter in the template contains (with slight modifications) the following function: <pre style="overflow: auto"> {{#invoke:InfoboxImage|InfoboxImage|image={{#if:{{{image|}}} |{{{image}}} |{{Infobox legislation/images |image={{if empty|{{{legislature|}}}|{{{considered_by|}}}|{{{enacted_by|}}}}} |date={{{date_enacted|}}} }} }}|size={{{imagesize|}}}|sizedefault=frameless|upright={{{upright|{{{image_upright|1}}}}}}|alt={{{imagealt|}}}}} </pre> The function does the following tasks: * If the parameter {{para|image}} is used in the template, that image is displayed. * If {{para|image}} is not used, a check is done to see if the value of {{para|legislature}} or {{para|enacted_by}} is listed in {{tl|Infobox legislation/images}}. If the result is blank, then no image is displayed. If the result is an image file (the coat of arms or seal, or a photograph of a building representing the person or institution that enacted the legislation), then the image file is displayed. {{tl|Infobox legislation/images}} can be tweaked to display different images depending on the date when the legislation was decided – for help with this, leave a message on the [[Template talk:Infobox legislation|talk page]]. * If a value is specified for {{para|imagesize}}, the image is given that width; otherwise the image width defaults to "frameless". * If a value, adds {{para|upright|{{var|value}}}} to image. Values less than 1 scale the image down (0.9 = 90%); values greater than 1 scale the image up (1.15 = 115%). * In either case the image is given alt text specified by {{para|imagealt}}. [[User:Jacklee|JackLee]] came up with the first version of this function for {{tl|Infobox court case}}, but thanks are due to [[User:Thumperward|Chris Cunningham]] for coming up with a cleaner solution that works better. ==TemplateData== {{TemplateData header}} {{Collapse top|title=TemplateData}} <templatedata> { "description": "Infobox for an article about an act, statute, bill, regulation, order, measure or other legislation in any jurisdiction. European Union, United Kingdom and United States federal legislations have specialised infoboxes of their own.", "format": "{{_\n| ______________ = _\n}}\n", "params": { "short_title": { "aliases": [ "name" ], "label": "Short title", "description": "Short title of the legislation. If a bill, enter the bill's current or most recent short title.", "type": "string", "default": "{{PAGENAME}}", "suggested": true }, "image": { "label": "Image", "description": "An image representing the institution or office that enacted/is enacting the legislation, such as a coat of arms, a seal, an emblem or a photograph of the institution's building. Omit \"File:\". Overrides any automatically set image.", "type": "wiki-file-name", "default": "{{Infobox legislation/images|image={{if empty|{{legislature|}}}|{{considered_by|}}}|{{{enacted_by|}}}}}|date={{{date_enacted|}}}}}" }, "legislature": { "label": "Legislature", "type": "content", "description": "Name of the legislature or institution enacting the legislation, wikilinked. Automatically sets image if available.", "suggested": true }, "imagesize": { "aliases": [ "image_size" ], "label": "Image size", "description": "Size of the image automatically set or specified in the image parameter.", "type": "string" }, "image_upright": { "aliases": [ "upright" ], "label": "Image upright factor", "description": "Scale factor for the image specified in 'image', particularly to scale tall, narrow images correctly. See 'Help:Pictures#Upright_images' for more information.", "type": "number", "default": "1" }, "imagealt": { "label": "Image alternative text", "description": "Description of the specified image when the image cannot be rendered, or for screen readers. Strongly recommended if an image is specified.", "type": "string" }, "caption": { "label": "Image caption", "description": "Caption for the image. This explains the image or its purpose in the current context and therefore is not necessarily the same as the alt text.", "type": "content" }, "long_title": { "label": "Long title", "description": "The long \"official\" title of the legislation or bill, in jurisdictions that use them.", "type": "string", "suggested": true }, "citation": { "label": "Citation", "description": "The citation of the legislation or bill. Use a template from 'Category:Law citation templates' or manually create an external link to the legislation if available online. Replace square brackets in the citation text with &#91; and &#93;", "type": "content", "suggested": true }, "territorial_extent": { "label": "Territorial extent", "description": "The territorial area(s) to which the legislation extends or applies. Wikilink where possible.", "type": "content", "suggested": true }, "considered_by": { "label": "Considered by", "description": "The institution (usually a debate chamber) that is considering/considered the bill or proposed/failed legislation. If the bill was passed or enacted by this institution, use 'enacted_by' instead. Wikilink where possible.", "type": "content" }, "enacted_by": { "label": "Enacted by", "description": "The institution (usually a debate chamber) that enacted the legislation. For bicameral legislatures, this is the first chamber the bill was introduced in. If the legislation is still being debated by or failed to be enacted by this chamber, use 'considered_by' instead. Wikilink where possible.", "type": "content", "suggested": true }, "date_passed": { "label": "Date passed", "description": "Date when the legislation was passed by the institution specified in 'enacted_by'. Use 'date_enacted' instead if appropriate in jurisdiction, but not both.", "type": "date" }, "date_enacted": { "label": "Date enacted", "description": "Date when the legislation was enacted by the institution specified in 'enacted_by'. Use 'date_passed' instead if appropriate in jurisdiction, but not both.", "type": "date", "suggested": true }, "considered_by2": { "label": "Considered by (second chamber)", "description": "The second chamber that is considering/considered the bill or proposed/failed legislation. For bicameral legislatures only. If the bill was passed or enacted by this chamber, use 'enacted_by2' instead. Wikilink where possible.", "type": "content" }, "enacted_by2": { "label": "Enacted by (second chamber)", "description": "The second chamber that enacted the legislation. For bicameral legislatures only. If the legislation is still being debated by or failed to be enacted by this chamber, use 'considered_by2' instead. Wikilink where possible.", "type": "content" }, "date_passed2": { "label": "Date passed (second chamber)", "description": "Date when the legislation was passed by the institution specified in 'enacted_by2'. For bicameral legislatures only. Use 'date_enacted2' instead if appropriate in jurisdiction, but not both.", "type": "date" }, "date_enacted2": { "label": "Date enacted (second chamber)", "description": "Date when the legislation was enacted by the chamber specified in 'enacted_by2'. For bicameral legislatures only. Use 'date_passed2' instead if appropriate in jurisdiction, but not both.", "type": "date" }, "date_assented": { "label": "Date assented to", "description": "Date when a head of state or their representative gave formal assent to the legislation. Use 'royal_assent' or 'date_signed' instead if appropriate in jurisdiction, but not two or all three simultaneously.", "type": "date", "suggested": true }, "royal_assent": { "label": "Date of royal assent", "description": "Date when a monarch or their representative gave royal assent to the legislation. Use 'date_assented' or 'date_signed' instead if appropriate in jurisdiction, but not two or all three simultaneously.", "type": "date" }, "date_signed": { "label": "Date signed", "description": "Date when a head of state or their representative signed the legislation into law. Use 'date_assented' or 'royal_assent' instead if appropriate in jurisdiction, but not two or all three simultaneously.", "type": "date" }, "signed_by": { "label": "Signed by", "description": "Person who signed the legislation into law. Only use if 'date_signed' is used. Wikilink if possible.", "type": "content" }, "date_commenced": { "aliases": [ "commencement" ], "description": "Date when the legislation came into force. This may be different from the date of assent or signature. Use 'date_effective' instead if appropriate in jurisdiction, but not both.", "type": "date", "label": "Date commenced", "suggested": true }, "date_effective": { "label": "Date effective", "description": "Date when the legislation became effective as law. This may be different from the date of assent or signature. Use 'date_commenced' instead if appropriate in jurisdiction, but not both.", "type": "date" }, "date_of_expiry": { "label": "Date of expiry", "description": "Date when the legislation automatically ceases to have effect (usually, but not always, when a sunset provision is included).", "type": "date" }, "date_repealed": { "label": "Date repealed", "description": "Date when the legislation is repealed. Note that legislation may be repealed before or after it had expired, so this parameter is not necessarily identical to 'date_of_expiry'.", "type": "date" }, "administered_by": { "label": "Administered by", "description": "The institution administering the legislation. Not necessary for most legislation. Wikilink if possible.", "type": "content" }, "bill": { "label": "Bill name", "description": "Name of the bill or proposed law when the legislation was still being considered by the institution specified in 'enacted_by' or 'considered_by'. Omit if this is still a bill in this institution and the name is the same as the current 'short_title'.", "type": "string", "suggested": true }, "bill_date": { "label": "Date bill published", "description": "Date when the bill was published to the institution specified in 'enacted_by' or 'considered_by'.", "type": "date", "suggested": true }, "1st_reading": { "label": "First reading", "description": "Date when the bill was read a first time in the chamber specified in 'enacted_by' or 'considered_by'. If in the unlikely circumstance the bill was first read over multiple days, specify a date range.", "type": "date", "suggested": true }, "2nd_reading": { "label": "Second reading", "description": "Date(s) when the bill was read a second time in the chamber specified in 'enacted_by' or 'considered_by'. If read over multiple days, specify a date range.", "type": "date", "suggested": true }, "committee_whole_label": { "label": "Committee of the whole title", "description": "Name of the stage between the second and third readings used by the chamber specified in 'enacted_by' or 'considered_by' in which the provisions of the bill is examined in detail (usually clause by clause) and amendments by legislators are considered.", "type": "content", "suggestedvalues": [ "Consideration in detail", "Committee stage" ], "default": "[[Committee of the whole]]", "suggested": true }, "committee_whole": { "label": "Date(s) considered by committee of the whole", "description": "Date(s) when the bill and its proposed amendments were considered in detail in the chamber specified in 'enacted_by' or 'considered_by'. If considered over multiple days, specify a date range. Omit if stage was skipped.", "type": "date", "suggested": true }, "3rd_reading": { "label": "Third reading", "description": "Date when the bill was read a third time in the chamber specified in 'enacted_by' or 'considered_by'. If in the unlikely circumstance the bill was read at this stage over multiple days, specify a date range.", "type": "date", "suggested": true }, "bill_citation": { "label": "Bill citation", "description": "The citation of the bill for this legislation in the institution specified in 'enacted_by' or 'considered_by'. Omit if this is still a bill in this institution and the citation is the same as the current 'citation'. Create an external link to the bill if available online. Replace square brackets in the citation text with &#91; and &#93;", "suggested": true, "type": "content" }, "introduced_by": { "label": "Introduced by", "description": "The member of the legislature that introduced the bill into the chamber. Wikilink where possible.", "type": "content", "suggested": true }, "conf_committee_passed": { "label": "Date conference committee bill passed", "description": "Date when the version of the bill adopted by the conference committee is passed by the chamber specified in 'enacted_by' or 'considered_by', in jurisdictions that do this.", "type": "date" }, "committee_report": { "label": "Committee report name", "description": "The name of a report issued by a committee in the chamber specified in 'enacted_by' or 'considered_by' about the bill. Create an external link to the report if available online.", "type": "content" }, "bill2": { "label": "Bill name (second chamber)", "type": "string", "description": "Name of the bill or proposed law when the legislation was still being considered by the chamber specified in 'enacted_by2' or 'considered_by2'. For bicameral legislatures only." }, "bill_citation2": { "label": "Bill citation (second chamber)", "type": "content", "description": "The citation of the bill for this legislation in the second chamber. For bicameral legislatures only. Create an external link to the bill if available online. Replace square brackets in the citation text with &#91; and &#93;" }, "bill_date2": { "label": "Date bill published (second chamber)", "type": "date", "description": "Date when the bill was published to the second chamber. For bicameral legislatures only." }, "introduced_by2": { "label": "Introduced by (second chamber)", "type": "content", "description": "The member of the legislature that introduced the bill into the second chamber. For bicameral legislatures only. Wikilink where possible." }, "1st_reading2": { "label": "First reading (second chamber)", "type": "date", "description": "Date when the bill was read a first time in the second chamber. For bicameral legislatures only. If in the unlikely circumstance the bill was first read over multiple days, specify a date range." }, "2nd_reading2": { "label": "Second reading (second chamber)", "type": "date", "description": "Date(s) when the bill was read a second time in the second chamber. For bicameral legislatures only. If read over multiple days, specify a date range." }, "committee_whole_label2": { "label": "Committee of the whole title (second chamber)", "description": "Name of the stage between the second and third readings used by the second chamber in which the provisions of the bill is examined in detail (usually clause by clause) and amendments by legislators are considered. For bicameral legislatures only.", "type": "content", "suggestedvalues": [ "Consideration in detail", "Committee stage" ] }, "committee_whole2": { "label": "Date(s) considered by committee of the whole (second chamber)", "description": "Date(s) when the bill and its proposed amendments were considered in detail by the second chamber. For bicameral legislatures only. If considered over multiple days, specify a date range. Omit if stage was skipped.", "type": "date" }, "3rd_reading2": { "label": "Third reading (second chamber)", "type": "date", "description": "Date when the bill was read a third time in the second chamber. For bicameral legislatures only. If in the unlikely circumstance the bill was read at this stage over multiple days, specify a date range." }, "conf_committee_passed2": { "label": "Date conference committee bill passed (second chamber)", "type": "date", "description": "Date when the version of the bill adopted by the conference committee is passed by the second chamber, in jurisdictions that do this. For bicameral legislatures only." }, "committee_report2": { "label": "Committee report name (second chamber)", "type": "content", "description": "The name of a report issued by a committee in the second chamber about the bill. For bicameral legislatures only. Create an external link to the report if available online." }, "date_conf_committee": { "label": "Date conference committee adopted bill", "type": "date", "description": "Date when the conference committee adopted their version of the bill, in jurisdictions that do this." }, "white_paper": { "label": "White paper", "type": "content", "description": "The name of a white paper relating to the legislation. Create an external link to the white paper if available online." }, "date_amendments_considered": { "label": "Date(s) when amendments from second chamber considered by first chamber", "description": "Date(s) when amendments made by the second chamber to the bill were considered by the originating chamber. For bicameral legislatures only. If considered over multiple days, specify a date range. Omit if no amendments were made.", "type": "date" }, "date_final_passage": { "label": "Date finally passed by both chambers", "description": "Date when the bill, after consideration of amendments, is finally passed by both chambers, with or without amendment. For bicameral legislatures only. Omit if no amendments were made.", "type": "date" }, "amends": { "label": "Amends", "type": "content", "description": "List of citations of other notable legislation that this legislation amends. Wikilink or external link where possible." }, "repeals": { "label": "Repeals", "type": "content", "description": "List of citations of other notable legislation that this legislation repeals. Wikilink or external link where possible." }, "amendments": { "deprecated": "Deprecated due to ambiguity. Use amends or amended_by as appropriate.", "label": "Amended by", "type": "content", "description": "Same as 'amended_by', but this parameter is deprecated." }, "amended_by": { "label": "Amended by", "type": "content", "description": "List of citations of other notable legislation that amends this legislation. Wikilink or external link where possible." }, "repealed_by": { "label": "Repealed by", "type": "content", "description": "Citation of the legislation that repealed this legislation. Wikilink or external link if possible." }, "related_legislation": { "aliases": [ "related" ], "label": "Related legislation", "type": "content", "description": "Names and citations of any other related legislation. Wikilink name and external link citation where possible." }, "summary": { "label": "Summary", "type": "content", "description": "A very brief summary of the subjects that the legislation deals with.", "suggested": true }, "keywords": { "label": "Keywords", "type": "content", "description": "A comma-separated list of keywords that describe the legal issues dealt with by the legislation. List keywords alphabetically and wikilink them wherever possible.", "suggested": true }, "status": { "type": "string", "label": "Status", "description": "The status of the legislation or bill. Select from the following: pending/not passed/withdrawn/blocked/not yet in force/not fully in force/current/in force/amended/expired/spent/repealed/struck down/halted/void/void ab initio. Do not capitalise. Other values will generate an 'unknown' status.", "required": true } }, "paramOrder": [ "short_title", "legislature", "image", "imagesize", "image_upright", "imagealt", "caption", "long_title", "citation", "territorial_extent", "considered_by", "enacted_by", "date_enacted", "date_passed", "considered_by2", "enacted_by2", "date_enacted2", "date_passed2", "date_assented", "royal_assent", "date_signed", "signed_by", "date_commenced", "date_effective", "date_of_expiry", "date_repealed", "administered_by", "bill", "bill_citation", "bill_date", "introduced_by", "1st_reading", "2nd_reading", "committee_whole_label", "committee_whole", "3rd_reading", "conf_committee_passed", "committee_report", "bill2", "bill_citation2", "bill_date2", "introduced_by2", "1st_reading2", "2nd_reading2", "committee_whole_label2", "committee_whole2", "3rd_reading2", "conf_committee_passed2", "committee_report2", "date_conf_committee", "white_paper", "date_amendments_considered", "date_final_passage", "amends", "repeals", "amended_by", "amendments", "repealed_by", "related_legislation", "summary", "keywords", "status" ] } </templatedata> {{Collapse bottom}} <includeonly>{{Sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Law infobox templates|Legislation]] [[Category:Politics and government infobox templates|Legislation]] [[Category:Embeddable templates]] }}</includeonly> 35c1301d25cba04d5ec4a20b3990955adf2bf674 Template:Infobox legislation 10 5 5 2022-05-16T06:07:09Z en>Pizza1016 0 wikitext text/x-wiki {{Infobox | child = {{{child|}}} | subbox = {{{subbox|}}} | above = {{{name|{{{short_title|<includeonly>{{PAGENAMEBASE}}</includeonly>}}}}}} | bodyclass = vcard | abovestyle = {{#if:{{{background_color|}}}|border-top: 2px solid {{{background_color}}}; border-bottom: 2px solid {{{background_color}}}|background-color: #ededed}} | headerstyle = {{#if:{{{background_color|}}}|border-top: 2px solid {{{background_color}}}; border-bottom: 2px solid {{{background_color}}}|background-color: #ededed}} |image = {{#invoke:InfoboxImage|InfoboxImage|image={{#if:{{{image|}}} |{{{image}}} |{{Infobox legislation/images |image={{if empty|{{{legislature|}}}|{{{enacted_by|}}}|{{{considered_by|}}}}} |date={{{date_enacted|}}} }} }}|size={{{imagesize|{{{image_size|}}}}}}|sizedefault=frameless|upright={{{upright|{{{image_upright|yes}}}}}}|alt={{{imagealt|}}}}} |caption = {{{caption|}}} | labelstyle = {{{labelstyle|}}} |header1 = {{if empty|{{{legislature|}}}|{{{enacted_by|}}}|{{{considered_by|}}}}} |data2 = {{Collapsible list |titlestyle=font-weight:normal;background:transparent;text-align:center; | title = '''[[Long title]]''' | {{#if: {{{long_title|}}} |{{center|{{{long_title}}} }} }} }} |label3 = Citation |data3 = {{{citation|}}} |label4 = Territorial extent |data4 = {{{territorial_extent|}}} |label5 = Considered&nbsp;by |data5 = {{{considered_by|}}} |label6 = Enacted&nbsp;by |data6 = {{{enacted_by|}}} |label7 = Passed |data7 = {{{date_passed|}}} |label8 = Enacted |data8 = {{{date_enacted|}}} |label9 = Considered&nbsp;by |data9 = {{{considered_by2|}}} |label10 = Enacted&nbsp;by |data10 = {{{enacted_by2|}}} |label11 = Passed |data11 = {{{date_passed2|}}} |label12 = Enacted |data12 = {{{date_enacted2|}}} |label13 = Assented&nbsp;by |data13 = {{{assented_by|}}} |label14 = Assented&nbsp;to |data14 = {{{date_assented|}}} |label15 = [[Royal assent]] |data15 = {{{royal_assent|}}} |label16 = Signed&nbsp;by |data16 = {{{signed_by|}}} |label17 = Signed |data17 = {{{date_signed|}}} |label18 = Vetoed&nbsp;by |data18 = {{{vetoed_by|}}} |label19 = Vetoed |data19 = {{{date_vetoed|}}} |label20 = Type&nbsp;of&nbsp;veto |data20 = {{{veto_type|}}} |label21 = Veto&nbsp;overridden |data21 = {{{veto_overridden|}}} |label22 = Holding |data22 = {{{reference_holding|}}} |label23 = [[Pocket veto|Pocket&nbsp;vetoed]] |data23 = {{{date_pocket_vetoed|}}} |label24 = Became law by inaction |data24 = {{{date_became_law_by_inaction|}}} |label25 = Commenced |data25 = {{{date_commenced|{{{commencement|}}}}}} |label26 = [[Effective date|Effective]] |data26 = {{{date_effective|}}} |label27 = Date&nbsp;of&nbsp;expiry |data27 = {{{date_of_expiry|}}} |label28 = Repealed |data28 = {{{date_repealed|}}} |label29 = Administered&nbsp;by |data29 = {{{administered_by|}}} |header30 = {{#if:{{{bill|}}}{{{bill_date|}}}{{{1st_reading|}}}{{{2nd_reading|}}}{{{3rd_reading|}}}|Legislative history}} |label31 = {{#if:{{{enacted_by2|{{{considered_by2|}}}}}}|[[Bill (proposed law)|Bill]] introduced in the {{{enacted_by|{{{considered_by}}}}}}|[[Bill (proposed law)|Bill]]}} |data31 = {{{bill|}}} |label32 = Bill citation |data32 = {{{bill_citation|}}} |label33 = Bill published on |data33 = {{{bill_date|}}} |label34 = Introduced by |data34 = {{{introduced_by|}}} |label35 = [[Reading (legislature)#First reading|First reading]] |data35 = {{{1st_reading|}}} |label36 = [[Reading (legislature)#Second reading|Second reading]] |data36 = {{{2nd_reading|}}} |label37 = {{{committee_whole_label|[[Committee of the whole]]}}} |data37 = {{{committee_whole|}}} |label38 = [[Reading (legislature)#Third reading|Third reading]] |data38 = {{{3rd_reading|}}} |label39 = [[Conference committee]] bill passed |data39 = {{{conf_committee_passed|}}} |label40 = Committee report |data40 = {{{committee_report|}}} |label41 = Bill introduced in the {{{enacted_by2|{{{considered_by2}}}}}} |data41 = {{{bill2|}}} |label42 = Bill citation |data42 = {{{bill_citation2|}}} |label43 = Bill published on |data43 = {{{bill_date2|}}} |label44 = Introduced by |data44 = {{{introduced_by2|}}} |label45 = First reading |data45 = {{{1st_reading2|}}} |label46 = Second reading |data46 = {{{2nd_reading2|}}} |label47 = {{{committee_whole_label2|Committee of the whole}}} |data47 = {{{committee_whole2|}}} |label48 = Third reading |data48 = {{{3rd_reading2|}}} |label49 = Conference committee bill passed |data49 = {{{conf_committee_passed2|}}} |label50 = Committee report |data50 = {{{committee_report2|}}} |label51 = Date passed by conference committee |data51 = {{{date_conf_committee|}}} |label52 = [[White paper#Government white papers|White paper]] |data52 = {{{white_paper|}}} |label53 = {{{enacted_by2|{{{considered_by2}}}}}} amendments considered by the {{{enacted_by|{{{considered_by}}}}}} |data53 = {{{date_amendments_considered|}}} |label54 = Finally passed both chambers |data54 = {{{date_final_passage|}}} |header60 = {{#if:{{{amends|}}}|Amends}} |data61 = {{{amends|}}} |header62 = {{#if:{{{repeals|}}}|[[Repeal]]s}} |data63 = {{{repeals|}}} |header64 = {{#if:{{{amended_by|{{{amendments|}}}}}}|Amended by}} |data65 = {{{amended_by|{{{amendments|}}}}}} |header66 = {{#if:{{{repealed_by|}}}|Repealed by}} |data67 = {{{repealed_by|}}} |header68 = {{#if:{{{related|{{{related_legislation|}}}}}}|Related legislation}} |data69 = {{{related|{{{related_legislation|}}}}}} |header70 = {{#if:{{{summary|}}}|Summary}} |data71 = {{{summary|}}} |header72 = {{#if:{{{keywords|}}}|Keywords}} |data73 = {{{keywords|}}} |header73 = {{#if:{{{original_text|}}}|[{{{original_text|}}} Text of statute as originally enacted]}} |belowstyle = background-color:{{#switch:{{lc:{{{status|}}}}} |pending = <nowiki>#</nowiki>FBEC5D |not passed = <nowiki>#</nowiki>FFCBDB |vetoed = <nowiki>#</nowiki>FFCBDB |withdrawn = <nowiki>#</nowiki>FFCBDB |blocked = <nowiki>#</nowiki>FFCBDB |void |void ab initio |halted = <nowiki>#</nowiki>FFCBDB |not yet in force |not fully in force = <nowiki>#</nowiki>FBEC5D |current |in force = <nowiki>#</nowiki>AAF0D1 |amended = <nowiki>#</nowiki>FFFFCC |expired |spent |repealed = <nowiki>#</nowiki>FFCCCC |#default = transparent; border-top:#aaa 1px solid; }}; |below = {{#if:{{{status|}}}|'''Status:''' {{#switch:{{lc:{{{status}}}}} |pending = Pending |not passed = Not passed |vetoed = Vetoed |withdrawn = Withdrawn |blocked = Blocked |not yet in force = Not yet in force |not fully in force = Not fully in force |current = Current legislation |in force = In force |amended = Amended |expired = Expired |spent = [[Spent enactment|Spent]] |repealed = [[Repeal]]ed |struck down = [[Judicial review|Struck down]] |halted = Halted |void = Void |void ab initio = Void ab initio |#default = Unknown }} }} }}{{#if:{{{amendments|}}}|[[Category:Pages using a deprecated parameter in the legislation infobox]]}}<noinclude> {{Documentation}}</noinclude> e691cd3a683148f0527f0b274bca56e8a45b89a3 6 5 2022-07-12T15:19:40Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{Infobox | child = {{{child|}}} | subbox = {{{subbox|}}} | above = {{{name|{{{short_title|<includeonly>{{PAGENAMEBASE}}</includeonly>}}}}}} | bodyclass = vcard | abovestyle = {{#if:{{{background_color|}}}|border-top: 2px solid {{{background_color}}}; border-bottom: 2px solid {{{background_color}}}|background-color: #ededed}} | headerstyle = {{#if:{{{background_color|}}}|border-top: 2px solid {{{background_color}}}; border-bottom: 2px solid {{{background_color}}}|background-color: #ededed}} |image = {{#invoke:InfoboxImage|InfoboxImage|image={{#if:{{{image|}}} |{{{image}}} |{{Infobox legislation/images |image={{if empty|{{{legislature|}}}|{{{enacted_by|}}}|{{{considered_by|}}}}} |date={{{date_enacted|}}} }} }}|size={{{imagesize|{{{image_size|}}}}}}|sizedefault=frameless|upright={{{upright|{{{image_upright|yes}}}}}}|alt={{{imagealt|}}}}} |caption = {{{caption|}}} | labelstyle = {{{labelstyle|}}} |header1 = {{if empty|{{{legislature|}}}|{{{enacted_by|}}}|{{{considered_by|}}}}} |data2 = {{Collapsible list |titlestyle=font-weight:normal;background:transparent;text-align:center; | title = '''[[Long title]]''' | {{#if: {{{long_title|}}} |{{center|{{{long_title}}} }} }} }} |label3 = Citation |data3 = {{{citation|}}} |label4 = Territorial extent |data4 = {{{territorial_extent|}}} |label5 = Considered&nbsp;by |data5 = {{{considered_by|}}} |label6 = Enacted&nbsp;by |data6 = {{{enacted_by|}}} |label7 = Passed |data7 = {{{date_passed|}}} |label8 = Enacted |data8 = {{{date_enacted|}}} |label9 = Considered&nbsp;by |data9 = {{{considered_by2|}}} |label10 = Enacted&nbsp;by |data10 = {{{enacted_by2|}}} |label11 = Passed |data11 = {{{date_passed2|}}} |label12 = Enacted |data12 = {{{date_enacted2|}}} |label13 = Assented&nbsp;by |data13 = {{{assented_by|}}} |label14 = Assented&nbsp;to |data14 = {{{date_assented|}}} |label15 = [[Royal assent]] |data15 = {{{royal_assent|}}} |label16 = Signed&nbsp;by |data16 = {{{signed_by|}}} |label17 = Signed |data17 = {{{date_signed|}}} |label18 = Vetoed&nbsp;by |data18 = {{{vetoed_by|}}} |label19 = Vetoed |data19 = {{{date_vetoed|}}} |label20 = Type&nbsp;of&nbsp;veto |data20 = {{{veto_type|}}} |label21 = Veto&nbsp;overridden |data21 = {{{veto_overridden|}}} |label22 = Holding |data22 = {{{reference_holding|}}} |label23 = [[Pocket veto|Pocket&nbsp;vetoed]] |data23 = {{{date_pocket_vetoed|}}} |label24 = Became law by inaction |data24 = {{{date_became_law_by_inaction|}}} |label25 = Commenced |data25 = {{{date_commenced|{{{commencement|}}}}}} |label26 = [[Effective date|Effective]] |data26 = {{{date_effective|}}} |label27 = Date&nbsp;of&nbsp;expiry |data27 = {{{date_of_expiry|}}} |label28 = Repealed |data28 = {{{date_repealed|}}} |label29 = Administered&nbsp;by |data29 = {{{administered_by|}}} |header30 = {{#if:{{{bill|}}}{{{bill_date|}}}{{{1st_reading|}}}{{{2nd_reading|}}}{{{3rd_reading|}}}|Legislative history}} |label31 = {{#if:{{{enacted_by2|{{{considered_by2|}}}}}}|[[Bill (proposed law)|Bill]] introduced in the {{{enacted_by|{{{considered_by}}}}}}|[[Bill (proposed law)|Bill]]}} |data31 = {{{bill|}}} |label32 = Bill citation |data32 = {{{bill_citation|}}} |label33 = Bill published on |data33 = {{{bill_date|}}} |label34 = Introduced by |data34 = {{{introduced_by|}}} |label35 = [[Reading (legislature)#First reading|First reading]] |data35 = {{{1st_reading|}}} |label36 = [[Reading (legislature)#Second reading|Second reading]] |data36 = {{{2nd_reading|}}} |label37 = {{{committee_whole_label|[[Committee of the whole]]}}} |data37 = {{{committee_whole|}}} |label38 = [[Reading (legislature)#Third reading|Third reading]] |data38 = {{{3rd_reading|}}} |label39 = [[Conference committee]] bill passed |data39 = {{{conf_committee_passed|}}} |label40 = Committee report |data40 = {{{committee_report|}}} |label41 = Bill introduced in the {{{enacted_by2|{{{considered_by2}}}}}} |data41 = {{{bill2|}}} |label42 = Bill citation |data42 = {{{bill_citation2|}}} |label43 = Bill published on |data43 = {{{bill_date2|}}} |label44 = Introduced by |data44 = {{{introduced_by2|}}} |label45 = First reading |data45 = {{{1st_reading2|}}} |label46 = Second reading |data46 = {{{2nd_reading2|}}} |label47 = {{{committee_whole_label2|Committee of the whole}}} |data47 = {{{committee_whole2|}}} |label48 = Third reading |data48 = {{{3rd_reading2|}}} |label49 = Conference committee bill passed |data49 = {{{conf_committee_passed2|}}} |label50 = Committee report |data50 = {{{committee_report2|}}} |label51 = Date passed by conference committee |data51 = {{{date_conf_committee|}}} |label52 = [[White paper#Government white papers|White paper]] |data52 = {{{white_paper|}}} |label53 = {{{enacted_by2|{{{considered_by2}}}}}} amendments considered by the {{{enacted_by|{{{considered_by}}}}}} |data53 = {{{date_amendments_considered|}}} |label54 = Finally passed both chambers |data54 = {{{date_final_passage|}}} |header60 = {{#if:{{{amends|}}}|Amends}} |data61 = {{{amends|}}} |header62 = {{#if:{{{repeals|}}}|[[Repeal]]s}} |data63 = {{{repeals|}}} |header64 = {{#if:{{{amended_by|{{{amendments|}}}}}}|Amended by}} |data65 = {{{amended_by|{{{amendments|}}}}}} |header66 = {{#if:{{{repealed_by|}}}|Repealed by}} |data67 = {{{repealed_by|}}} |header68 = {{#if:{{{related|{{{related_legislation|}}}}}}|Related legislation}} |data69 = {{{related|{{{related_legislation|}}}}}} |header70 = {{#if:{{{summary|}}}|Summary}} |data71 = {{{summary|}}} |header72 = {{#if:{{{keywords|}}}|Keywords}} |data73 = {{{keywords|}}} |header73 = {{#if:{{{original_text|}}}|[{{{original_text|}}} Text of statute as originally enacted]}} |belowstyle = background-color:{{#switch:{{lc:{{{status|}}}}} |pending = <nowiki>#</nowiki>FBEC5D |not passed = <nowiki>#</nowiki>FFCBDB |vetoed = <nowiki>#</nowiki>FFCBDB |withdrawn = <nowiki>#</nowiki>FFCBDB |blocked = <nowiki>#</nowiki>FFCBDB |void |void ab initio |halted = <nowiki>#</nowiki>FFCBDB |not yet in force |not fully in force = <nowiki>#</nowiki>FBEC5D |current |in force = <nowiki>#</nowiki>AAF0D1 |amended = <nowiki>#</nowiki>FFFFCC |expired |spent |repealed = <nowiki>#</nowiki>FFCCCC |#default = transparent; border-top:#aaa 1px solid; }}; |below = {{#if:{{{status|}}}|'''Status:''' {{#switch:{{lc:{{{status}}}}} |pending = Pending |not passed = Not passed |vetoed = Vetoed |withdrawn = Withdrawn |blocked = Blocked |not yet in force = Not yet in force |not fully in force = Not fully in force |current = Current legislation |in force = In force |amended = Amended |expired = Expired |spent = [[Spent enactment|Spent]] |repealed = [[Repeal]]ed |struck down = [[Judicial review|Struck down]] |halted = Halted |void = Void |void ab initio = Void ab initio |#default = Unknown }} }} }}{{#if:{{{amendments|}}}|[[Category:Pages using a deprecated parameter in the legislation infobox]]}}<noinclude> {{Documentation}}</noinclude> e691cd3a683148f0527f0b274bca56e8a45b89a3 Template:Module rating 10 108 274 2022-06-03T15:10:23Z en>The Anome 0 Reverted edits by [[Special:Contribs/Dawn PScLim|Dawn PScLim]] ([[User talk:Dawn PScLim|talk]]) to last version by Alexis Jazz wikitext text/x-wiki <includeonly>{{#ifeq:{{SUBPAGENAME}}|doc|<!--do not show protection level of the module on the doc page, use the second and optionally third parameter if the doc page is also protected -->{{#if:{{{2|}}}|{{Pp|{{{2}}}|action={{{3|}}}}}}}|{{Module other|{{ombox | type = notice | image = {{#switch: {{{1|}}} | pre-alpha | prealpha | pa = [[File:Ambox warning blue construction.svg|40x40px|link=|alt=Pre-alpha]] | alpha | a = [[File:Alpha lowercase.svg|26x26px|link=|alt=Alpha]] | beta | b = [[File:Greek lc beta.svg|40x40px|link=|alt=Beta]] | release | r | general | g = [[File:Green check.svg|40x40px|link=|alt=Ready for use]] | protected | protect | p = [[File:{{#switch:{{#invoke:Effective protection level|edit|{{#switch:{{SUBPAGENAME}}|doc|sandbox={{FULLBASEPAGENAME}}|{{FULLPAGENAME}}}}}}|autoconfirmed=Semi|extendedconfirmed=Extended|accountcreator|templateeditor=Template|#default=Full}}-protection-shackle.svg|40x40px|link=|alt=Protected]] | semiprotected | semiprotect | semi =[[File:Semi-protection-shackle.svg|40x40px|link=|alt=Semi-protected]] }} | style = | textstyle = | text = {{#switch: {{{1|}}} | pre-alpha | prealpha | pa = This module is rated as [[:Category:Modules in pre-alpha development|pre-alpha]]. It is unfinished, and may or may not be in active development. It should not be used from article namespace pages. Modules remain pre-alpha until the original editor (or someone who takes one over if it is abandoned for some time) is satisfied with the basic structure.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules in pre-alpha development|{{PAGENAME}}]] }} }} | alpha | a = This module is rated as [[:Category:Modules in alpha|alpha]]. It is ready for third-party input, and may be used on a few pages to see if problems arise, but should be watched. Suggestions for new features or changes in their input and output mechanisms are welcome.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules in alpha|{{PAGENAME}}]] }} }} | beta | b = This module is rated as [[:Category:Modules in beta|beta]], and is ready for widespread use. It is still new and should be used with some caution to ensure the results are as expected.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules in beta|{{PAGENAME}}]] }} }} | release | r | general | g = This module is rated as [[:Category:Modules for general use|ready for general use]]. It has reached a mature form and is thought to be relatively bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other Wikipedia resources as an option for new users to learn. To reduce server load and bad output, it should be improved by [[Wikipedia:Template sandbox and test cases|sandbox testing]] rather than repeated trial-and-error editing.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules for general use|{{PAGENAME}}]] }} }} | protected | protect | p = This module is [[:Category:Modules subject to page protection|subject to page protection]]. It is a [[Wikipedia:High-risk templates|highly visible module]] in use by a very large number of pages, or is [[Wikipedia:Substitution|substituted]] very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is [[Wikipedia:Protection policy|protected]] from editing.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules subject to page protection|{{PAGENAME}}]] }} }} | semiprotected | semiprotect | semi = This module is [[:Category:Modules subject to page protection|subject to page protection]]. It is a [[Wikipedia:High-risk templates|highly visible module]] in use by a very large number of pages, or is [[Wikipedia:Substitution|substituted]] very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is [[WP:SEMI|semi-protected]] from editing.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules subject to page protection|{{PAGENAME}}]] }} }} | #default = {{error|Module rating is invalid or not specified.}} }} }}|{{error|Error: {{tl|Module rating}} must be placed in the Module namespace.}} [[Category:Pages with templates in the wrong namespace]]|demospace={{{demospace|<noinclude>module</noinclude>}}}}}}}</includeonly><noinclude> {{module rating|release|nocat=true|demospace=module}} {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go in Wikidata. --> </noinclude> bbd244b3ea2e13ec4c1c810ae44f2f3789a93efc Module:High-use 828 111 280 2022-06-12T23:44:07Z en>NguoiDungKhongDinhDanh 0 Comma should not be bolded (via [[:m:User:NguoiDungKhongDinhDanh/CodeAjaxEditor.js|CAE]]) Scribunto text/plain local p = {} -- _fetch looks at the "demo" argument. local _fetch = require('Module:Transclusion_count').fetch local yesno = require('Module:Yesno') function p.num(frame, count) if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end -- Build output string local return_value = "" if count == nil then if frame.args[1] == "risk" then return_value = "a very large number of" else return_value = "many" end else -- Use 2 significant figures for smaller numbers and 3 for larger ones local sigfig = 2 if count >= 100000 then sigfig = 3 end -- Prepare to round to appropriate number of sigfigs local f = math.floor(math.log10(count)) - sigfig + 1 -- Round and insert "approximately" or "+" when appropriate if (frame.args[2] == "yes") or (mw.ustring.sub(frame.args[1],-1) == "+") then -- Round down return_value = string.format("%s+", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) ) * (10^(f))) ) else -- Round to nearest return_value = string.format("approximately&#x20;%s", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) + 0.5) * (10^(f))) ) end -- Insert percentage of pages if that is likely to be >= 1% and when |no-percent= not set to yes if count and count > 250000 and not yesno (frame:getParent().args['no-percent']) then local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5) if percent >= 1 then return_value = string.format("%s&#x20;pages, or roughly %s%% of all", return_value, percent) end end end return return_value end -- Actions if there is a large (greater than or equal to 100,000) transclusion count function p.risk(frame) local return_value = "" if frame.args[1] == "risk" then return_value = "risk" else local count = _fetch(frame) if count and count >= 100000 then return_value = "risk" end end return return_value end function p.text(frame, count) -- Only show the information about how this template gets updated if someone -- is actually editing the page and maybe trying to update the count. local bot_text = (frame:preprocess("{{REVISIONID}}") == "") and "\n\n----\n'''Preview message''': Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]])." or '' if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end local title = mw.title.getCurrentTitle() if title.subpageText == "doc" or title.subpageText == "sandbox" then title = title.basePageTitle end local systemMessages = frame.args['system'] if frame.args['system'] == '' then systemMessages = nil end -- This retrieves the project URL automatically to simplify localiation. local templateCount = ('on [https://linkcount.toolforge.org/index.php?project=%s&page=%s %s pages]'):format( mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'), mw.uri.encode(title.fullText), p.num(frame, count)) local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used '; if systemMessages then used_on_text = used_on_text .. systemMessages .. ((count and count > 2000) and ("''', and " .. templateCount) or ("'''")) else used_on_text = used_on_text .. templateCount .. "'''" end local sandbox_text = ("%s's [[%s/sandbox|/sandbox]] or [[%s/testcases|/testcases]] subpages, or in your own [[%s]]. "):format( (mw.title.getCurrentTitle().namespace == 828 and "module" or "template"), title.fullText, title.fullText, mw.title.getCurrentTitle().namespace == 828 and "Module:Sandbox|module sandbox" or "Wikipedia:User pages#SUB|user subpage" ) local infoArg = frame.args["info"] ~= "" and frame.args["info"] if (systemMessages or frame.args[1] == "risk" or (count and count >= 100000) ) then local info = systemMessages and '.<br/>Changes to it can cause immediate changes to the Wikipedia user interface.' or '.' if infoArg then info = info .. "<br />" .. infoArg end sandbox_text = info .. '<br /> To avoid major disruption' .. (count and count >= 100000 and ' and server load' or '') .. ', any changes should be tested in the ' .. sandbox_text .. 'The tested changes can be added to this page in a single edit. ' else sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' and c') .. 'hanges may be widely noticed. Test changes in the ' .. sandbox_text end local discussion_text = systemMessages and 'Please discuss changes ' or 'Consider discussing changes ' if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then discussion_text = string.format("%sat [[%s]]", discussion_text, frame.args["2"]) else discussion_text = string.format("%son the [[%s|talk page]]", discussion_text, title.talkPageTitle.fullText ) end return used_on_text .. sandbox_text .. discussion_text .. " before implementing them." .. bot_text end function p.main(frame) local count = nil if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end local image = "[[File:Ambox warning yellow.svg|40px|alt=Warning|link=]]" local type_param = "style" local epilogue = '' if frame.args['system'] and frame.args['system'] ~= '' then image = "[[File:Ambox important.svg|40px|alt=Warning|link=]]" type_param = "content" local nocat = frame:getParent().args['nocat'] or frame.args['nocat'] local categorise = (nocat == '' or not yesno(nocat)) if categorise then epilogue = frame:preprocess('{{Sandbox other||{{#switch:{{#invoke:Effective protection level|{{#switch:{{NAMESPACE}}|File=upload|#default=edit}}|{{FULLPAGENAME}}}}|sysop|templateeditor|interfaceadmin=|#default=[[Category:Pages used in system messages needing protection]]}}}}') end elseif (frame.args[1] == "risk" or (count and count >= 100000)) then image = "[[File:Ambox warning orange.svg|40px|alt=Warning|link=]]" type_param = "content" end if frame.args["form"] == "editnotice" then return frame:expandTemplate{ title = 'editnotice', args = { ["image"] = image, ["text"] = p.text(frame, count), ["expiry"] = (frame.args["expiry"] or "") } } .. epilogue else return require('Module:Message box').main('ombox', { type = type_param, image = image, text = p.text(frame, count), expiry = (frame.args["expiry"] or "") }) .. epilogue end end return p e65a49e327a83e27b6a35ceff8dce344edee0840 Template:Clear 10 7 9 2022-06-13T15:31:11Z en>Xaosflux 0 Changed protection settings for "[[Template:Clear]]": [[WP:High-risk templates|Highly visible template]]: 3MM+ uses ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki <div style="clear:{{{1|both}}};"></div><noinclude> {{documentation}} </noinclude> 38bab3e3d7fbd3d6800d46556e60bc6bac494d72 10 9 2022-07-12T15:19:41Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <div style="clear:{{{1|both}}};"></div><noinclude> {{documentation}} </noinclude> 38bab3e3d7fbd3d6800d46556e60bc6bac494d72 Module:Uses TemplateStyles/config 828 117 292 2022-06-16T15:10:06Z en>Pppery 0 Matching reality rather than 2018 me's wishful thinking Scribunto text/plain local cfg = {} -- Don’t touch this line. -- Subpage blacklist: these subpages will not be categorized (except for the -- error category, which is always added if there is an error). -- For example “Template:Foo/doc” matches the `doc = true` rule, so it will have -- no categories. “Template:Foo” and “Template:Foo/documentation” match no rules, -- so they *will* have categories. All rules should be in the -- ['<subpage name>'] = true, -- format. cfg['subpage_blacklist'] = { ['doc'] = true, ['sandbox'] = true, ['sandbox2'] = true, ['testcases'] = true, } -- Sandbox title: if the stylesheet’s title is <template>/<stylesheet>.css, the -- stylesheet’s sandbox is expected to be at <template>/<sandbox_title>/<stylesheet>.css -- Set to nil to disable sandbox links. cfg['sandbox_title'] = 'sandbox' -- Error category: this category is added if the module call contains errors -- (e.g. no stylesheet listed). A category name without namespace, or nil -- to disable categorization (not recommended). cfg['error_category'] = 'Uses TemplateStyles templates with errors' -- Default category: this category is added if no custom category is specified -- in module/template call. A category name without namespace, or nil -- to disable categorization. cfg['default_category'] = 'Templates using TemplateStyles' -- Protection conflict category: this category is added if the protection level -- of any stylesheet is lower than the protection level of the template. A category name -- without namespace, or nil to disable categorization (not recommended). cfg['protection_conflict_category'] = 'Templates using TemplateStyles with a different protection level' -- Hierarchy of protection levels, used to determine whether one protection level is lower -- than another and thus should populate protection_conflict_category. No protection is treated as zero cfg['protection_hierarchy'] = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } -- Padlock pattern: Lua pattern to search on protected stylesheets for, or nil -- to disable padlock check. cfg['padlock_pattern'] = '{{pp-' -- Missing padlock category: this category is added if a protected stylesheet -- doesn’t contain any padlock template (specified by the above Lua pattern). -- A category name without namespace (no nil allowed) if the pattern is not nil, -- unused (and thus may be nil) otherwise. cfg['missing_padlock_category'] = 'Templates using TemplateStyles without padlocks' return cfg -- Don’t touch this line. 58e7a37c44f6ea3f6b8af54a559d696cc7256493 Module:Uses TemplateStyles 828 116 290 2022-06-16T15:13:38Z en>Pppery 0 Matching reality rather than 2018 me's wishful thinking Scribunto text/plain local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local TNT = require('Module:TNT') local p = {} local function format(msg, ...) return TNT.format('I18n/Uses TemplateStyles', msg, ...) end local function getConfig() return mw.loadData('Module:Uses TemplateStyles/config') end local function renderBox(tStyles) local boxArgs = { type = 'notice', small = true, image = string.format('[[File:Farm-Fresh css add.svg|32px|alt=%s]]', format('logo-alt')) } if #tStyles < 1 then boxArgs.text = string.format('<strong class="error">%s</strong>', format('error-emptylist')) else local cfg = getConfig() local tStylesLinks = {} for i, ts in ipairs(tStyles) do local link = string.format('[[:%s]]', ts) local sandboxLink = nil local tsTitle = mw.title.new(ts) if tsTitle and cfg['sandbox_title'] then local tsSandboxTitle = mw.title.new(string.format( '%s:%s/%s/%s', tsTitle.nsText, tsTitle.baseText, cfg['sandbox_title'], tsTitle.subpageText)) if tsSandboxTitle and tsSandboxTitle.exists then sandboxLink = format('sandboxlink', link, ':' .. tsSandboxTitle.prefixedText) end end tStylesLinks[i] = sandboxLink or link end local tStylesList = mList.makeList('bulleted', tStylesLinks) boxArgs.text = format( mw.title.getCurrentTitle():inNamespaces(828,829) and 'header-module' or 'header-template') .. '\n' .. tStylesList end return mMessageBox.main('mbox', boxArgs) end local function renderTrackingCategories(args, tStyles, titleObj) if yesno(args.nocat) then return '' end local cfg = getConfig() local cats = {} -- Error category if #tStyles < 1 and cfg['error_category'] then cats[#cats + 1] = cfg['error_category'] end -- TemplateStyles category titleObj = titleObj or mw.title.getCurrentTitle() if (titleObj.namespace == 10 or titleObj.namespace == 828) and not cfg['subpage_blacklist'][titleObj.subpageText] then local category = args.category or cfg['default_category'] if category then cats[#cats + 1] = category end if not yesno(args.noprotcat) and (cfg['protection_conflict_category'] or cfg['padlock_pattern']) then local currentProt = titleObj.protectionLevels["edit"] and titleObj.protectionLevels["edit"][1] or nil local addedLevelCat = false local addedPadlockCat = false for i, ts in ipairs(tStyles) do local tsTitleObj = mw.title.new(ts) local tsProt = tsTitleObj.protectionLevels["edit"] and tsTitleObj.protectionLevels["edit"][1] or nil if cfg['padlock_pattern'] and tsProt and not addedPadlockCat then local content = tsTitleObj:getContent() if not content:find(cfg['padlock_pattern']) then cats[#cats + 1] = cfg['missing_padlock_category'] addedPadlockCat = true end end if cfg['protection_conflict_category'] and currentProt and tsProt ~= currentProt and not addedLevelCat then currentProt = cfg['protection_hierarchy'][currentProt] or 0 tsProt = cfg['protection_hierarchy'][tsProt] or 0 if tsProt < currentProt then addedLevelCat = true cats[#cats + 1] = cfg['protection_conflict_category'] end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end function p._main(args, cfg) local tStyles = mTableTools.compressSparseArray(args) local box = renderBox(tStyles) local trackingCategories = renderTrackingCategories(args, tStyles) return box .. trackingCategories end function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end return p 71ca57c37849f38e3c5ee30061bdae730963e48e Template:Infobox UN resolution/doc 10 159 380 2022-06-19T18:29:24Z wikipedia>Jonesey95 0 add auto short description wikitext text/x-wiki {{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{Lua|Module:Infobox|Module:InfoboxImage|Module:Check for unknown parameters}} {{auto short description}} This template can be used to display a summary of [[United Nations]] [[United Nations Security Council|Security Council]] and [[United Nations General Assembly|General Assembly]] resolutions. == Usage == {{Parameter names example | organ | number | image | image_size | image_alt | caption | date | year | meeting | code | document | subject | votemap | votemap_size | votemap_alt | for | against | abstention | absent | presentnotvoting | result }} <pre style="overflow: auto;"> {{Infobox UN resolution | organ = | number = | image = | image_size = | image_alt = | caption = | date = | year = | meeting = | code = | document = | subject = | votemap = | votemap_size = | votemap_alt = | for = | against = | abstention = | absent = | presentnotvoting = | result = }} </pre> {{clear}} == Parameters == {{TemplateData header}} <templatedata> { "params": { "number": { "required": true, "description": "The number of the resolution" }, "organ": { "required": true, "description": "Use 'SC' for Security Council or 'GA' for General Assembly" }, "image": { "description": "A suitable image" }, "image_size": { "description": "Image size" }, "image_alt": { "description": "Alternative text for image" }, "caption":{ "description": "A caption for the image" }, "date": { "required": true, "description": "The date and month the resolution was voted on" }, "year": { "required": true, "description": "The year the resolution was voted on" }, "meeting": { "description": "The number of the meeting" }, "code": { "description": "The official code given to the resolution" }, "document": { "description": "A link to the resolution text, preferably from the UN website. If document=yes, a link will be generated based on the code" }, "subject": { "description": "The subject of the resolution" }, "votemap":{ "description": "A map of the vote" }, "votemap_size":{ "description": "Image size for map of the vote" }, "votemap_alt":{ "description": "Alternative text for map of the vote" }, "for": { "required": true, "description": "How many member states voted for the resolution" }, "against": { "required": true, "description": "How many member states voted against the resolution" }, "abstention": { "required": true, "description": "How many member states abstained" }, "absent": { "description": "How many member states were absent" }, "presentnotvoting": { "description": "How many member states were present not voting" }, "result": { "required": true, "description": "Use 'Adopted', 'Failed' or 'Vetoed by <country>'" } } } </templatedata> == Examples == {{Infobox UN resolution | number = 2017 | organ = SC | date = 31 October | year = 2011 | meeting = 6,644 | code = S/RES/2017 (2011) | subject = [[Libya]]n situation | for = 15 | abstention = 0 | against = 0 | result = Adopted }} <pre style="overflow:auto;"> {{Infobox UN resolution | number = 2017 | organ = SC | date = 31 October | year = 2011 | meeting = 6,644 | code = S/RES/2017 (2011) | subject = [[Libya]]n situation | for = 15 | abstention = 0 | against = 0 | result = Adopted }} </pre> {{clear}} {{Infobox UN resolution | number = 2337 | organ = SC | image = Gambia (orthographic projection with inset).svg | caption = Map of the Gambia | date = 19 January | year = 2017 | meeting = 7,866 | code = S/RES/2337 (2017) | document = yes | subject = [[2016–2017 Gambian constitutional crisis]] | votemap = S-RES-2337.svg | for = 15 | abstention = 0 | against = 0 | result = Adopted }} <pre style="overflow:auto;"> {{Infobox UN resolution | number = 2337 | organ = SC | image = Gambia (orthographic projection with inset).svg | caption = Map of the Gambia | date = 19 January | year = 2017 | meeting = 7,866 | code = S/RES/2337 (2017) | document = yes | subject = [[2016–2017 Gambian constitutional crisis]] | votemap = S-RES-2337.svg | for = 15 | abstention = 0 | against = 0 | result = Adopted }} </pre> {{clear}} ==Tracking category== * {{clc|Pages using infobox UN resolution with unknown parameters}} <includeonly>{{Sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:United Nations templates]] [[Category:Templates that add a tracking category]] }}</includeonly> 5196c27860ee8709992f64781c6da074461362c6 Module:Check for unknown parameters/doc 828 127 312 2022-07-02T01:34:02Z en>Pppery 0 Rvv wikitext text/x-wiki {{used in system|in [[MediaWiki:Abusefilter-warning-DS]]}} {{module rating|p}} {{Lua|Module:If preview|noprotcat=yes}} This module may be appended to a template to check for uses of unknown parameters. == Usage == === Basic usage === <pre> {{#invoke:check for unknown parameters|check |unknown=[[Category:Some tracking category]] |arg1|arg2|arg3|argN}} </pre> or to sort the entries in the tracking category by parameter with a preview error message <pre> {{#invoke:check for unknown parameters|check |unknown=[[Category:Some tracking category|_VALUE_]] |preview=unknown parameter "_VALUE_" |arg1|arg2|...|argN}} </pre> or for an explicit red error message <pre> {{#invoke:check for unknown parameters|check |unknown=<span class="error">Sorry, I don't recognize _VALUE_</span> |arg1|arg2|...|argN}} </pre> Here, <code>arg1</code>, <code>arg2</code>, ..., <code>argN</code>, are the known parameters. Unnamed (positional) parameters can be added too: <code><nowiki>|1|2|argname1|argname2|...</nowiki></code>. Any parameter which is used, but not on this list, will cause the module to return whatever is passed with the <code>unknown</code> parameter. The <code>_VALUE_</code> keyword, if used, will be changed to the name of the parameter. This is useful for either sorting the entries in a tracking category, or for provide more explicit information. By default, the module makes no distinction between a defined-but-blank parameter and a non-blank parameter. That is, both unlisted {{para|foo|x}} and {{para|foo}} are reported. To only track non-blank parameters use {{para|ignoreblank|1}}. By default, the module ignores blank positional parameters. That is, an unlisted {{para|2}} is ignored. To ''include'' blank positional parameters in the tracking use {{para|showblankpositional|1}}. === Lua patterns === This module supports [[:mw:Extension:Scribunto/Lua reference manual#Patterns|Lua patterns]] (similar to [[regular expression]]s), which are useful when there are many known parameters which use a systematic pattern. For example, [[template:infobox3cols]] uses <pre> | regexp1 = header[%d][%d]* | regexp2 = label[%d][%d]* | regexp3 = data[%d][%d]*[abc]? | regexp4 = class[%d][%d]*[abc]? | regexp5 = rowclass[%d][%d]* | regexp6 = rowstyle[%d][%d]* | regexp7 = rowcellstyle[%d][%d]* </pre> to match all parameters of the form <code>headerNUM</code>, <code>labelNUM</code>, <code>dataNUM</code>, <code>dataNUMa</code>, <code>dataNUMb</code>, <code>dataNUMc</code>, ..., <code>rowcellstyleNUM</code>, where NUM is a string of digits. == Example == <pre> {{Infobox | above = {{{name|}}} | label1 = Height | data1 = {{{height|}}} | label2 = Weight | data2 = {{{weight|}}} | label3 = Website | data3 = {{{website|}}} }}<!-- end infobox, start tracking -->{{#invoke:Check for unknown parameters|check | unknown = {{main other|[[Category:Some tracking category|_VALUE_]]}} | preview = unknown parameter "_VALUE_" | name | height | weight | website }} </pre> ==See also== * {{clc|Unknown parameters}} (category page can have header {{tl|Unknown parameters category}}) * [[Module:Check for deprecated parameters]] – similar module that checks for deprecated parameters * [[Module:Check for clobbered parameters]] – module that checks for conflicting parameters * [[Module:TemplatePar]] – similar function (originally from dewiki) * [[Template:Parameters]] and [[Module:Parameters]] – generates a list of parameter names for a given template * [[Project:TemplateData]] based template parameter validation * [[Module:Parameter validation]] checks a lot more * [[User:Bamyers99/TemplateParametersTool]] - A tool for checking usage of template parameters <includeonly>{{sandbox other|| <!-- Categories go here and interwikis go in Wikidata. --> [[Category:Modules that add a tracking category]] }}</includeonly> 31dae7f38272fceeee327160df2aae7df2c99fb0 Template:Auto short description 10 130 322 2022-07-04T08:57:44Z wikipedia>Sammi Brie 0 grammar fix wikitext text/x-wiki {{Ombox | type = notice | text = This template {{#if:{{{sometimes|}}}|sometimes{{sp}}}}adds an automatically generated '''[[Wikipedia:Short description|short description]]'''{{#if:{{{category|}}}|{{sp}}({{{category}}})|}}{{#if:{{{conditions|}}}|{{space}}{{{conditions}}}}}. If the automatic short description is not optimal, replace it by adding {{tl|Short description}} at the top of the article. }}<includeonly>{{Subpage other|<!-- do not categorise -->|[[Category:Templates that generate short descriptions{{#if:{{{category|}}}|{{sp}}for {{{category}}}|}}]]}}</includeonly><noinclude> {{Documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 4ef114404749d204ef6574916944eb2d8478640e Template:Infobox legislature 10 78 208 2022-07-07T04:30:46Z en>Politicsfan4 0 Undid revision 1092727862 by [[Special:Contributions/Jeet Dev|Jeet Dev]] ([[User talk:Jeet Dev|talk]]) unexplained change in color wikitext text/x-wiki {{Infobox | bodyclass = vcard | abovestyle = font-size: 125%; {{#if:{{{background_color|}}}|border-top: 2px solid {{{background_color}}}; border-bottom: 2px solid {{{background_color}}}|background-color: #ededed}} | above = <includeonly><div style="display:inline" class="fn org">{{{name}}}</div> {{#if:{{{native_name|}}}|<br /><div style="display:inline" class="nickname" {{#if:{{{native_name_lang|}}}|lang="{{{native_name_lang}}}"}}>{{{native_name}}}</div>{{#if:{{{transcription_name|}}}|<br /><div style="display:inline" class="nickname">{{{transcription_name}}}</div>}}}}</includeonly> | subheader = {{{legislature|}}} | image = {{#invoke:InfoboxImage|InfoboxImage |image={{{coa_pic|{{{coa-pic|}}}}}} |size={{{coa_res|{{{coa-res|}}}}}} |sizedefault=frameless |upright=yes |alt={{{coa_alt|{{{coa-alt|Coat of arms or logo}}}}}} }} | caption = {{{coa_caption|}}} | image2 = {{#invoke:InfoboxImage |InfoboxImage |image={{{logo|{{{logo_pic|{{{logo-pic|}}}}}}}}} |size={{{logo_res|{{{logo-res|}}}}}} |sizedefault=frameless |upright=yes |alt={{{logo_alt|{{{logo-alt|Logo}}}}}} }} | caption2 = {{{logo_caption|}}} | headerstyle = {{#if:{{{background_color|}}}|border-top: 2px solid {{{background_color}}}; border-bottom: 2px solid {{{background_color}}}|background-color: #ededed}} | labelstyle = {{{labelstyle|}}} | header1 = {{#if:{{{house_type|}}}{{{houses|}}}{{{term_limits|}}}|Type}} | label2 = Type | data2 = {{#if:{{{house_type|}}} |<div style="padding:0.1em 0;line-height:1.3em;<!--(modified longitem)-->"><div style="display:inline" class="category">{{#ifexist:{{{house_type}}}|[[{{{house_type}}}]]|{{{house_type}}}}}</div> {{#if:{{{body|}}} |of the [[{{{body}}}]]}} {{#if:{{{jurisdiction|}}} |of [[{{{jurisdiction}}}]]}}</div>}} | label3 = {{#if:{{{houses|}}}|Houses|Chambers}} | data3 = {{#if:{{{houses|}}}|{{{houses}}}|{{{chambers|}}}}} | label4 = {{longitem|Term limits}} | data4 = {{{term_limits|}}} | header5 = {{#if:{{{foundation|}}}{{{disbanded|}}}{{{preceded_by|}}}{{{succeeded_by|}}}{{{new_session|}}}|History}} | label6 = {{#if:{{{foundation|}}}|Founded|Established}} | data6 = {{#if:{{{foundation|}}}|{{{foundation}}}|{{{established|}}}}} | label7 = Disbanded | data7 = {{{disbanded|}}} | label8 = Preceded&nbsp;by | data8 = {{{preceded_by|}}} | label9 = Succeeded&nbsp;by | data9 = {{{succeeded_by|}}} | label10 = {{longitem|New session started}} | data10 = {{{new_session|}}} | header14 = {{#if:{{{leader1|}}}{{{leader2|}}}{{{leader3|}}}{{{leader4|}}}{{{leader5|}}}{{{leader6|}}}{{{leader7|}}}{{{leader8|}}}|Leadership}} | label15 = {{longitem|{{{leader1_type|}}}}} | data15 = {{#if:{{{leader1|}}} |{{longitem|style=line-height:1.3em|{{{leader1|}}}{{#if:{{{party1|}}}|{{#ifeq:{{Str index|{{{party1|}}}|1}}|(||,}}&#32;{{{party1|}}}}} {{#if:{{{election1|}}}|<br/>since {{{election1|}}}|{{#if:{{{leader1_term|}}}|<br/>{{{leader1_term}}}}} }} }} }} | label16 = {{longitem|style=line-height:1.3em|{{{leader2_type|}}}}} | data16 = {{#if:{{{leader2|}}} |{{longitem|style=line-height:1.3em|{{{leader2|}}}{{#if:{{{party2|}}}|{{#ifeq:{{Str index|{{{party2|}}}|1}}|(||,}}&#32;{{{party2|}}}}} {{#if:{{{election2|}}}|<br/>since {{{election2|}}}|{{#if:{{{leader2_term|}}}|<br/>{{{leader2_term}}}}} }} }} }} | label17 = {{longitem|style=line-height:1.3em|{{{leader3_type|}}}}} | data17 = {{#if:{{{leader3|}}} |{{longitem|style=line-height:1.3em|{{{leader3|}}}{{#if:{{{party3|}}}|{{#ifeq:{{Str index|{{{party3|}}}|1}}|(||,}}&#32;{{{party3|}}}}} {{#if:{{{election3|}}}|<br/>since {{{election3|}}}|{{#if:{{{leader3_term|}}}|<br/>{{{leader3_term}}}}} }} }} }} | label18 = {{longitem|style=line-height:1.3em|{{{leader4_type|}}}}} | data18 = {{#if:{{{leader4|}}} |{{longitem|style=line-height:1.3em|{{{leader4|}}}{{#if:{{{party4|}}}|{{#ifeq:{{Str index|{{{party4|}}}|1}}|(||,}}&#32;{{{party4|}}}}} {{#if:{{{election4|}}}|<br/>since {{{election4|}}}|{{#if:{{{leader4_term|}}}|<br/>{{{leader4_term}}}}} }} }} }} | label19 = {{longitem|style=line-height:1.3em|{{{leader5_type|}}}}} | data19 = {{#if:{{{leader5|}}} |{{longitem|style=line-height:1.3em|{{{leader5|}}}{{#if:{{{party5|}}}|{{#ifeq:{{Str index|{{{party5|}}}|1}}|(||,}}&#32;{{{party5|}}}}} {{#if:{{{election5|}}}|<br/>since {{{election5|}}}|{{#if:{{{leader5_term|}}}|<br/>{{{leader5_term}}}}} }} }} }} | label20 = {{longitem|style=line-height:1.3em|{{{leader6_type|}}}}} | data20 = {{#if:{{{leader6|}}} |{{longitem|style=line-height:1.3em|{{{leader6|}}}{{#if:{{{party6|}}}|{{#ifeq:{{Str index|{{{party6|}}}|1}}|(||,}}&#32;{{{party6|}}}}} {{#if:{{{election6|}}}|<br/>since {{{election6|}}}|{{#if:{{{leader6_term|}}}|<br/>{{{leader6_term}}}}} }} }} }} | label21 = {{longitem|style=line-height:1.3em|{{{leader7_type|}}}}} | data21 = {{#if:{{{leader7|}}} |{{longitem|style=line-height:1.3em|{{{leader7|}}}{{#if:{{{party7|}}}|{{#ifeq:{{Str index|{{{party7|}}}|1}}|(||,}}&#32;{{{party7|}}}}} {{#if:{{{election7|}}}|<br/>since {{{election7|}}}|{{#if:{{{leader7_term|}}}|<br/>{{{leader7_term}}}}} }} }} }} | label22 = {{longitem|style=line-height:1.3em|{{{leader8_type|}}}}} | data22 = {{#if:{{{leader8|}}} |{{longitem|style=line-height:1.3em|{{{leader8|}}}{{#if:{{{party8|}}}|{{#ifeq:{{Str index|{{{party8|}}}|1}}|(||,}}&#32;{{{party8|}}}}} {{#if:{{{election8|}}}|<br/>since {{{election8|}}}|{{#if:{{{leader8_term|}}}|<br/>{{{leader8_term}}}}} }} }} }} | label23 = {{longitem|style=line-height:1.3em|{{{leader9_type|}}}}} | data23 = {{#if:{{{leader9|}}} |{{longitem|style=line-height:1.3em|{{{leader9|}}}{{#if:{{{party9|}}}|{{#ifeq:{{Str index|{{{party9|}}}|1}}|(||,}}&#32;{{{party9|}}}}} {{#if:{{{election9|}}}|<br/>since {{{election9|}}}|{{#if:{{{leader9_term|}}}|<br/>{{{leader9_term}}}}} }} }} }} | label24 = {{longitem|style=line-height:1.3em|{{{leader10_type|}}}}} | data24 = {{#if:{{{leader10|}}} |{{longitem|style=line-height:1.3em|{{{leader10|}}}{{#if:{{{party10|}}}|{{#ifeq:{{Str index|{{{party10|}}}|1}}|(||,}}&#32;{{{party10|}}}}} {{#if:{{{election10|}}}|<br/>since {{{election10|}}}|{{#if:{{{leader10_term|}}}|<br/>{{{leader10_term}}}}} }} }} }} | header25 = {{#if:{{{structure1|}}}{{{political_groups1|}}}{{{structure2|}}}{{{political_groups2|}}}{{{committees1|}}}{{{committees2|}}}{{{joint_committees|}}}{{{term_length|}}}{{{authority|}}}{{{salary|}}} {{{seats1|}}}{{{seats2|}}}{{{seats3|}}}{{{seats4|}}}{{{seats5|}}}{{{seats6|}}}{{{seats7|}}}{{{seats8|}}}|Structure}} | label26 = Seats | data26 = {{#if:{{{members|}}}|{{{members}}}|{{{seats|}}}}} | data27 = {{#invoke:InfoboxImage|InfoboxImage|image={{{structure1|}}}|size={{{structure1_res|}}}|sizedefault=120px|alt={{{structure1_alt|}}}}} | label28 = {{longitem|{{#if:{{{house1|}}}|{{{house1}}} political groups|Political groups}}}} | data28 = {{{political_groups1|}}} | data29 = {{#invoke:InfoboxImage|InfoboxImage|image={{{structure2|}}}|size={{{structure2_res|}}}|sizedefault=120px|alt={{{structure2_alt|}}}}} | label30 = {{longitem|{{#if:{{{house2|}}}|{{{house2}}} political groups|Political groups}}}} | data30 = {{{political_groups2|}}} | label31 = {{#if:{{{house1|}}}|{{{house1}}} committees|Committees}} | data31 = {{{committees1|}}} | label32 = {{#if:{{{house2|}}}|{{{house2}}} committees|Committees}} | data32 = {{{committees2|}}} | label33 = {{longitem|Joint committees}} | data33 = {{{joint_committees|}}} | label34 = {{longitem|Length of term}} | data34 = {{{term_length|}}} | label35 = Authority | data35 = {{{authority|}}} | label36 = Salary | data36 = {{{salary|}}} | label37 = {{longitem|{{{seats1_title|}}}}} | data37 = {{{seats1|}}} | label38 = {{longitem|{{{seats2_title|}}}}} | data38 = {{{seats2|}}} | label39 = {{longitem|{{{seats3_title|}}}}} | data39 = {{{seats3|}}} | label40 = {{longitem|{{{seats4_title|}}}}} | data40 = {{{seats4|}}} | label41 = {{longitem|{{{seats5_title|}}}}} | data41 = {{{seats5|}}} | label42 = {{longitem|{{{seats6_title|}}}}} | data42 = {{{seats6|}}} | label43 = {{longitem|{{{seats7_title|}}}}} | data43 = {{{seats7|}}} | label44 = {{longitem|{{{seats8_title|}}}}} | data44 = {{{seats8|}}} | label45 = {{longitem|{{{seats9_title|}}}}} | data45 = {{{seats9|}}} | label46 = {{longitem|{{{seats10_title|}}}}} | data46 = {{{seats10|}}} | header47 = {{#if:{{{voting_system1|}}}{{{voting_system2|}}}{{{first_election1|}}}{{{first_election2|}}}{{{first_election3|}}}{{{last_election1|}}}{{{last_election2|}}}{{{last_election3|}}}{{{next_election1|}}}{{{next_election2|}}}{{{next_election3|}}}{{{redistricting|}}}|Elections}} | label48 = {{longitem|{{#if:{{{house1|}}}|{{{house1}}} [[electoral system|voting system]]|[[electoral system|Voting system]]}}}} | data48 = {{{voting_system1|}}} | label49 = {{longitem|{{#if:{{{house2|}}}|{{{house2}}} [[electoral system|voting system]]|[[electoral system|Voting system]]}}}} | data49 = {{{voting_system2|}}} | label50 = {{longitem|{{#if:{{{house1|}}}|{{{house1}}} first election|First election}}}} | data50 = {{{first_election1|}}} | label51 = {{longitem|{{#if:{{{house2|}}}|{{{house2}}} first election|First election}}}} | data51 = {{{first_election2|}}} | label52 = {{longitem|First general election}} | data52 = {{{first_election3|}}} | label53 = {{longitem|{{#if:{{{house1|}}}|{{{house1}}} last election|Last election}}}} | data53 = {{{last_election1|}}} | label54 = {{longitem|{{#if:{{{house2|}}}|{{{house2}}} last election|Last election}}}} | data54 = {{{last_election2|}}} | label55 = {{longitem|Last general election}} | data55 = {{{last_election3|}}} | label56 = {{longitem|{{#if:{{{house1|}}}|{{{house1}}} next election|Next election}}}} | data56 = {{{next_election1|}}} | label57 = {{longitem|{{#if:{{{house2|}}}|{{{house2}}} next election|Next election}}}} | data57 = {{{next_election2|}}} | label58 = {{longitem|Next general election}} | data58 = {{{next_election3|}}} | label59 = Redistricting | data59 = {{{redistricting|}}} | header60 = {{#if:{{{motto|}}}|Motto}} | data61 = {{{motto|}}} | header62 = {{#if:{{{session_room|}}}{{{meeting_place|}}}|Meeting place}} | data63 = {{#invoke:InfoboxImage|InfoboxImage|image={{{session_room|}}}|size={{{session_res|}}}|alt={{{session_alt|}}}}} | data64 = {{{meeting_place|}}} | class64 = label | data65 = {{#invoke:InfoboxImage|InfoboxImage|image={{{session_room2|}}}|size={{{session_res2|}}}|alt={{{session_alt2|}}}}} | data66 = {{{meeting_place2|}}} | class66 = label | data67 = {{#invoke:InfoboxImage|InfoboxImage|image={{{session_room3|}}}|size={{{session_res3|}}}|alt={{{session_alt3|}}}}} | data68 = {{{meeting_place3|}}} | class68 = label | header69 = {{#if:{{{website|}}}|Website}} | data70 = {{{website|}}} | header71 = {{#if:{{{constitution|}}}|Constitution}} | data72 = {{{constitution|}}} | header73 = {{#if:{{{rules|}}}|Rules}} | data74 = {{{rules|}}} | header75 = {{#if:{{{footnotes|}}}|Footnotes}} | data76 = {{{footnotes|}}} }}{{Main other|{{#if:{{{background_color|}}}{{{text_color|}}}|[[Category:Infobox legislature with background color]]}}}}{{#invoke:Check for unknown parameters|check|unknown={{main other|}}|preview=Page using [[Template:Infobox legislature]] with unknown parameter "_VALUE_"|ignoreblank=y| authority | background_color | body | categories | chambers | coa_alt | coa_caption | coa_pic | coa_res | coa-alt | coa-pic | coa-res | committees1 | committees2 | constitution | demo | disbanded | election1 | election2 | election3 | election4 | election5 | election6 | election7 | election8 | election9 | election10 | established | first_election1 | first_election2 | first_election3 | footnotes | foundation | house_type | house1 | house2 | houses | joint_committees | jurisdiction | labelstyle | last_election1 | last_election2 | last_election3 | leader1 | leader1_type | leader2 | leader2_type | leader3 | leader3_type | leader4 | leader4_type | leader5 | leader5_type | leader6 | leader6_type | leader7 | leader7_type | leader8 | leader8_type | leader9 | leader9_type | leader10 | leader10_type | legislature | logo | logo_alt | logo_caption | logo_pic | logo_res | logo-alt | logo-pic | logo-res | meeting_place | meeting_place2 | meeting_place3 | members | motto | name | native_name | native_name_lang | new_session | next_election1 | next_election2 | next_election3 | nocat | party1 | party2 | party3 | party4 | party5 | party6 | party7 | party8 | party9 | party10 | political_groups1 | political_groups2 | preceded_by | redistricting | rules | salary | seats | seats1 | seats1_title | seats2 | seats2_title | seats3 | seats3_title | seats4 | seats4_title | seats5 | seats5_title | seats6 | seats6_title | seats7 | seats7_title | seats8 | seats8_title | session_alt | session_alt2 | session_alt3 | session_res | session_res2 | session_res3 | session_room | session_room2 | session_room3 | structure1 | structure1_alt | structure1_res | structure2 | structure2_alt | structure2_res | succeeded_by | term_length | term_limits | text_color | transcription_name | voting_system1 | voting_system2 | website }}<noinclude> {{documentation}}<!--Please add this template's categories to the /doc subpage, not here - thanks!--> </noinclude> b00afd5d875cd23a8dd37d1a90c778bbf1c5a838 Template:Country data United States 10 155 372 2022-07-07T06:38:41Z wikipedia>Paine Ellsworth 0 per edit request on talk page - switch Coast Guard from ensign to flag wikitext text/x-wiki {{safesubst<noinclude />: {{{1<noinclude>|country showdata</noinclude>}}} | alias = United States | flag alias = Flag of the United States.svg | flag alias-1776 = Flag of the United States (1776–1777).svg | flag alias-1777 = Flag of the United States (1777–1795).svg | flag alias-1777-Ross = Betsy Ross flag.svg | flag alias-1795 = Flag of the United States (1795–1818).svg | flag alias-1818 = Flag of the United States (1818-1819).svg | flag alias-1819 = Flag of the United States (1819-1820).svg | flag alias-1820 = Flag of the United States (1820-1822).svg | flag alias-1822 = Flag of the United States (1822-1836).svg | flag alias-1836 = Flag of the United States (1836-1837).svg | flag alias-1837 = Flag of the United States (1837-1845).svg | flag alias-1845 = Flag of the United States (1845-1846).svg | flag alias-1846 = Flag of the United States (1846-1847).svg | flag alias-1847 = Flag of the United States (1847-1848).svg | flag alias-1848 = Flag of the United States (1848-1851).svg | flag alias-1851 = Flag of the United States (1851-1858).svg | flag alias-1858 = Flag of the United States (1858-1859).svg | flag alias-1859 = Flag of the United States (1859-1861).svg | flag alias-1861 = Flag of the United States (1861-1863).svg | flag alias-1863 = Flag of the United States (1863-1865).svg | flag alias-1865 = Flag of the United States (1865-1867).svg | flag alias-1867 = Flag of the United States (1867-1877).svg | flag alias-1877 = Flag of the United States (1877-1890).svg | flag alias-1890 = Flag of the United States (1890-1891).svg | flag alias-1891 = Flag of the United States (1891-1896).svg | flag alias-1896 = Flag of the United States (1896-1908).svg | flag alias-1908 = Flag of the United States (1908-1912).svg | flag alias-1912 = Flag of the United States (1912-1959).svg | flag alias-1959 = Flag of the United States (1959-1960).svg | flag alias-1960 = Flag of the United States (Pantone).svg | flag alias-air force = Flag of the United States Air Force.svg | flag alias-coast guard-1799 = Ensign of the United States Revenue-Marine (1799).png | flag alias-coast guard-1815 = Ensign of the United States Revenue-Marine (1815).png | flag alias-coast guard-1836 = Ensign of the United States Revenue-Marine (1836).png | flag alias-coast guard-1841 = Ensign of the United States Revenue-Marine (1841).png | flag alias-coast guard-1867 = Ensign of the United States Revenue-Marine (1867).png | flag alias-coast guard-1868 = Ensign of the United States Revenue-Marine (1868).png | flag alias-coast guard-1915 = Ensign of the United States Coast Guard (1915-1953).png | flag alias-coast guard = Flag of the United States Coast Guard.svg | link alias-coast guard = {{#switch:{{{variant|}}}|coast guard|coast guard-1915=United States Coast Guard|coast guard-1894=United States Revenue Cutter Service|coast guard-1799|coast guard-1815|coast guard-1836|coast guard-1841|coast guard-1867|coast guard-1868=United States Revenue-Marine|United States Coast Guard}} | flag alias-army = Flag of the United States Army.svg | link alias-naval = {{#switch:{{{variant|}}}|navy|coast guard-1915=United States Coast Guard|United States Coast Guard|United States Navy}} | flag alias-navy-1864 = Flag of the United States Navy (1864-1959).svg | flag alias-navy = Flag of the United States Navy (official).svg | link alias-navy = United States Navy | link alias-marines = {{#switch:{{{variant|}}}|marines|marines-1914=United States Marine Corps|United States Marine Corps}} | flag alias-marines-1914 = Flag of the United States Marine Corps (1914-1939).png | flag alias-marines = Flag of the United States Marine Corps.svg | flag alias-space force = Flag of the United States Space Force.svg | link alias-football = United States {{{mw|men's}}} national {{{age|}}} soccer team | link alias-Australian rules football = United States {{{mw|men's}}} national Australian rules football team | {{#ifeq:{{{altlink}}}|A national rugby union team|link alias-rugby union|empty}} = USA Selects | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | altvar = {{{altvar|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1776 | var2 = 1777 | var3 = 1777-Ross | var4 = 1795 | var5 = 1818 | var6 = 1819 | var7 = 1820 | var8 = 1822 | var9 = 1836 | var10 = 1837 | var11 = 1845 | var12 = 1846 | var13 = 1847 | var14 = 1848 | var15 = 1851 | var16 = 1858 | var17 = 1859 | var18 = 1861 | var19 = 1863 | var20 = 1865 | var21 = 1867 | var22 = 1877 | var23 = 1890 | var24 = 1891 | var25 = 1896 | var26 = 1908 | var27 = 1912 | var28 = 1959 | var29 = 1960 | var30 = coast guard-1915 | var31 = marines-1914 | redir1 = USA | redir2 = US | redir3 = United States of America | redir4 = U.S. </noinclude> }} d023ca4f572e7014db32ac0b6b348871a97d025b Module:Message box/configuration 828 56 107 2022-07-11T18:19:26Z en>Izno 0 add templatestyles, remove a variable or two as a result Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '<small>[[Help:Maintenance template removal|Learn how and when to remove this template message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css' }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false, templatestyles = 'Module:Message box/fmbox.css' }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox license.png' -- @todo We need an SVG version of this }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg' }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css' }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } b6f0151037e6867b577c8cca32ff297e48697a10 Module:Message box 828 55 105 2022-07-11T18:19:29Z en>Izno 0 add templatestyles, remove a variable or two as a result Scribunto text/plain require('Module:No globals') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage or 'Imbox notice.png', imageSize) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) fd6a8b1a0ac5916465cdf2eb099825f1d006cfba Module:Message box/ombox.css 828 99 252 2022-07-11T18:40:17Z en>Izno 0 and move mbox-small to 720px here as well text text/plain /* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ombox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } 8fe3df4bb607e699eab2dbd23bd4a1a446391002 Home 0 1 1 2022-07-12T12:34:55Z MediaWiki default 1 Create main page wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This Main Page was created automatically and it seems it hasn't been replaced yet. === For the bureaucrat(s) of this wiki === Hello, and welcome to your new wiki! Thank you for choosing Miraheze for the hosting of your wiki, we hope you will enjoy our hosting. You can immediately start working on your wiki or whenever you want. Need help? No problem! We will help you with your wiki as needed. To start, try checking out these helpful links: * [[mw:Special:MyLanguage/Help:Contents|MediaWiki guide]] (e.g. navigation, editing, deleting pages, blocking users) * [[meta:Special:MyLanguage/FAQ|Miraheze FAQ]] * [[meta:Special:MyLanguage/Request features|Request settings changes on your wiki]]. (Extensions, Skin and Logo/Favicon changes should be done through [[Special:ManageWiki]] on your wiki, see [[meta:Special:MyLanguage/ManageWiki|ManageWiki]] for more information.) ==== I still don't understand X! ==== Well, that's no problem. Even if something isn't explained in the documentation/FAQ, we are still happy to help you. You can find us here: * [[meta:Special:MyLanguage/Help center|On our own Miraheze wiki]] * On [[phab:|Phabricator]] * On [https://miraheze.org/discord Discord] * On IRC in #miraheze on irc.libera.chat ([irc://irc.libera.chat/%23miraheze direct link]; [https://web.libera.chat/?channel=#miraheze webchat]) === For visitors of this wiki === Hello, the default Main Page of this wiki (this page) has not yet been replaced by the bureaucrat(s) of this wiki. The bureaucrat(s) might still be working on a Main Page, so please check again later! 21236ac3f8d65e5563b6da6b70815ca6bf1e6616 File:Librarylogo.png 6 2 2 2022-07-12T13:52:21Z 17ademoladav 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Favicon.ico 6 3 3 2022-07-12T15:09:42Z 17ademoladav 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 MediaWiki:Common.css 8 4 4 2022-07-12T15:16:10Z 17ademoladav 2 Created page with "/* * This is the CSS common to all desktop skins on en.Wikipedia. * Styling inside .mw-parser-output should generally use TemplateStyles. */ /* Reset italic styling set by user agent */ cite, dfn { font-style: inherit; } /* Straight quote marks for <q> */ q { quotes: '"' '"' "'" "'"; } /* Avoid collision of blockquote with floating elements by swapping margin and padding */ blockquote { overflow: hidden; margin: 1em 0; padding: 0 40px; } /* Consistent size for..." css text/css /* * This is the CSS common to all desktop skins on en.Wikipedia. * Styling inside .mw-parser-output should generally use TemplateStyles. */ /* Reset italic styling set by user agent */ cite, dfn { font-style: inherit; } /* Straight quote marks for <q> */ q { quotes: '"' '"' "'" "'"; } /* Avoid collision of blockquote with floating elements by swapping margin and padding */ blockquote { overflow: hidden; margin: 1em 0; padding: 0 40px; } /* Consistent size for <small>, <sub> and <sup> */ small { font-size: 85%; } .mw-body-content sub, .mw-body-content sup, span.reference /* for Parsoid */ { font-size: 80%; } /* Same spacing for indented and unindented paragraphs on talk pages */ .ns-talk .mw-body-content dd { margin-top: 0.4em; margin-bottom: 0.4em; } /* Reduce page jumps by hiding collapsed/dismissed content */ .client-js .mw-special-Watchlist #watchlist-message, .client-js .collapsible:not( .mw-made-collapsible).collapsed > tbody > tr:not(:first-child), /* Hide charinsert base for those not using the gadget */ #editpage-specialchars { display: none; } /* Adds padding above Watchlist announcements where new recentchanges/watchlist filters are enabled */ .mw-rcfilters-enabled .mw-specialpage-summary { margin-top: 1em; } /* Make the list of references smaller * Keep in sync with Template:Refbegin/styles.css * And Template:Reflist/styles.css */ ol.references { font-size: 90%; margin-bottom: 0.5em; } /* Styling for jQuery makeCollapsible, matching that of collapseButton */ .mw-parser-output .mw-collapsible-toggle:not(.mw-ui-button) { font-weight: normal; /* @noflip */ text-align: right; padding-right: 0.2em; padding-left: 0.2em; } .mw-collapsible-leftside-toggle .mw-collapsible-toggle { /* @noflip */ float: left; /* @noflip */ text-align: left; } /* Lists in wikitable data cells are always left-aligned */ .wikitable td ul, .wikitable td ol, .wikitable td dl { /* @noflip */ text-align: left; } /* Fix for hieroglyphs specificity issue in infoboxes ([[phab:T43869]]) */ .mw-parser-output table.mw-hiero-table td { vertical-align: middle; } /* Change the external link icon to a PDF icon for all PDF files */ .mw-parser-output a[href$=".pdf"].external, .mw-parser-output a[href*=".pdf?"].external, .mw-parser-output a[href*=".pdf#"].external, .mw-parser-output a[href$=".PDF"].external, .mw-parser-output a[href*=".PDF?"].external, .mw-parser-output a[href*=".PDF#"].external { background: url("//upload.wikimedia.org/wikipedia/commons/4/4d/Icon_pdf_file.png") no-repeat right; /* @noflip */ padding: 8px 18px 8px 0; } /* System messages styled similarly to fmbox */ div.mw-warning-with-logexcerpt, div.mw-lag-warn-high, div.mw-cascadeprotectedwarning, div#mw-protect-cascadeon, div.titleblacklist-warning { clear: both; margin: 0.2em 0; border: 1px solid #bb7070; background-color: #ffdbdb; padding: 0.25em 0.9em; box-sizing: border-box; } /* default colors for partial block message */ .mw-contributions-blocked-notice-partial .mw-warning-with-logexcerpt { border-color: #fc3; background-color: #fef6e7; } /* Increase the height of the image upload box */ #wpUploadDescription { height: 13em; } /* Minimum thumb width */ .thumbinner { min-width: 100px; } /* Prevent floating boxes from overlapping any category listings, file histories, edit previews, and edit [Show changes] views. */ #mw-subcategories, #mw-pages, #mw-category-media, #filehistory, #wikiPreview, #wikiDiff { clear: both; } /* Styling for Abuse Filter tags */ .mw-tag-markers { font-style: italic; font-size: 90%; } /* Hide stuff meant for accounts with special permissions. Made visible again in [[MediaWiki:Group-checkuser.css]], [[MediaWiki:Group-sysop.css]], [[MediaWiki:Group-abusefilter.css]], [[MediaWiki:Group-abusefilter-helper.css]], [[MediaWiki:Group-patroller.css]], [[MediaWiki:Group-templateeditor.css]], [[MediaWiki:Group-extendedmover.css]], [[MediaWiki:Group-extendedconfirmed.css]], and [[Mediawiki:Group-autoconfirmed.css]]. */ .checkuser-show, .sysop-show, .abusefilter-show, .abusefilter-helper-show, .patroller-show, .templateeditor-show, .extendedmover-show, .extendedconfirmed-show, .autoconfirmed-show, .user-show { display: none; } /* Hide the redlink generated by {{Editnotice}}, this overrides the ".sysop-show { display: none; }" above that applies to the same link as well. See [[phab:T45013]] Hide the images in editnotices to keep them readable in VE view. Long term, editnotices should become a core feature so that they can be designed responsive. */ .ve-ui-mwNoticesPopupTool-item .editnotice-redlink, .ve-ui-mwNoticesPopupTool-item .mbox-image, .ve-ui-mwNoticesPopupTool-item .mbox-imageright { display: none !important; } /* Remove bullets when there are multiple edit page warnings */ ul.permissions-errors { margin: 0; } ul.permissions-errors > li { list-style: none none; } /* larger inline math */ span.mwe-math-mathml-inline { font-size: 118%; } /* Make <math display="block"> be left aligned with one space indent for * compatibility with style conventions */ .mwe-math-fallback-image-display, .mwe-math-mathml-display { margin-left: 1.6em !important; margin-top: 0.6em; margin-bottom: 0.6em; } .mwe-math-mathml-display math { display: inline; } @media screen { /* Gallery styles background changes are restricted to screen view. In printing we should avoid applying backgrounds. */ /* The backgrounds for galleries. */ #content .gallerybox div.thumb { /* Light gray padding */ background-color: #f8f9fa; } /* Put a chequered background behind images, only visible if they have transparency. '.filehistory a img' and '#file img:hover' are handled by MediaWiki core (as of 1.19) */ .gallerybox .thumb img { background: #fff url(//upload.wikimedia.org/wikipedia/commons/5/5d/Checker-16x16.png) repeat; } /* But not on articles, user pages, or portals. */ .ns-0 .gallerybox .thumb img, .ns-2 .gallerybox .thumb img, .ns-100 .gallerybox .thumb img { background-image: none; } /* Display "From Wikipedia, the free encyclopedia" in skins that support it, do not apply to print mode */ #siteSub { display: block; } } /* Hide FlaggedRevs notice UI when there are no pending changes */ .flaggedrevs_draft_synced, .flaggedrevs_stable_synced, /* "Temporary" to remove links in sidebar T255381 */ #t-upload, /* Hide broken download box on Special:Book pending T285400 */ .mw-special-Book #coll-downloadbox { display: none; } /* * BELOW HERE THERE BE SOONTOBE TEMPLATESTYLES THINGS; * SEE [[MediaWiki talk:Common.css/to do]] */ /* Style for horizontal lists (separator following item). @source mediawiki.org/wiki/Snippets/Horizontal_lists @revision 8 (2016-05-21) @author [[User:Edokter]] */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { margin: 0; /* don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again */ display: inline; } /* Display nested lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* Generate interpuncts */ .hlist dt:after { content: ": "; } /** * Note hlist style usage differs in Minerva and is defined in core as well! * Please check Minerva desktop (and Minerva.css) when changing * See https://phabricator.wikimedia.org/T213239 */ .hlist dd:after, .hlist li:after { content: " · "; font-weight: bold; } .hlist dd:last-child:after, .hlist dt:last-child:after, .hlist li:last-child:after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child:before, .hlist dd dt:first-child:before, .hlist dd li:first-child:before, .hlist dt dd:first-child:before, .hlist dt dt:first-child:before, .hlist dt li:first-child:before, .hlist li dd:first-child:before, .hlist li dt:first-child:before, .hlist li li:first-child:before { content: " ("; font-weight: normal; } .hlist dd dd:last-child:after, .hlist dd dt:last-child:after, .hlist dd li:last-child:after, .hlist dt dd:last-child:after, .hlist dt dt:last-child:after, .hlist dt li:last-child:after, .hlist li dd:last-child:after, .hlist li dt:last-child:after, .hlist li li:last-child:after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li:before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child:before, .hlist dt ol > li:first-child:before, .hlist li ol > li:first-child:before { content: " (" counter(listitem) "\a0"; } /* Unbulleted lists */ .plainlist ol, .plainlist ul { line-height: inherit; list-style: none none; margin: 0; } .plainlist ol li, .plainlist ul li { margin-bottom: 0; } /* Infobox template style */ .infobox { border: 1px solid #a2a9b1; border-spacing: 3px; background-color: #f8f9fa; color: black; /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; font-size: 88%; line-height: 1.5em; width: 22em; } .infobox-header, .infobox-label, .infobox-above, .infobox-full-data, .infobox-data, .infobox-below, .infobox-subheader, .infobox-image, .infobox-navbar, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox th, .infobox td { vertical-align: top; } .infobox-label, .infobox-data, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox th, .infobox td { /* @noflip */ text-align: left; } /* Remove .infobox when element selectors above are removed */ .infobox .infobox-above, .infobox .infobox-title, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox caption { font-size: 125%; font-weight: bold; text-align: center; } .infobox-title, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox caption { padding: 0.2em; } /* Remove .infobox when element selectors above are removed */ .infobox .infobox-header, .infobox .infobox-subheader, .infobox .infobox-image, .infobox .infobox-full-data, .infobox .infobox-below { text-align: center; } /* Remove .infobox when element selectors above are removed */ .infobox .infobox-navbar { /* @noflip */ text-align: right; } /* Normal font styling for wikitable row headers with scope="row" tag */ .wikitable.plainrowheaders th[scope=row], .wikitable.plainrowheaders th[scope=rowgroup] { font-weight: normal; /* @noflip */ text-align: left; } /* ambox/tmbox/imbox/cmbox/ombox/fmbox message boxes */ th.mbox-text, td.mbox-text { /* The message body cell(s) */ border: none; /* @noflip */ padding: 0.25em 0.9em; /* 0.9em left/right */ width: 100%; /* Make all mboxes the same width regardless of text length */ } td.mbox-image { /* The left image cell */ border: none; /* @noflip */ padding: 2px 0 2px 0.9em; /* 0.9em left, 0px right */ text-align: center; } td.mbox-imageright { /* The right image cell */ border: none; /* @noflip */ padding: 2px 0.9em 2px 0; /* 0px left, 0.9em right */ text-align: center; } td.mbox-empty-cell { /* An empty narrow cell */ border: none; padding: 0; width: 1px; } /* Article message box styles */ table.ambox { margin: 0 10%; /* 10% = Will not overlap with other elements */ border: 1px solid #a2a9b1; /* @noflip */ border-left: 10px solid #36c; /* Default "notice" blue */ background-color: #fbfbfb; box-sizing: border-box; } /* Single border between stacked boxes. */ table.ambox + table.ambox, table.ambox + .mw-empty-elt + table.ambox { margin-top: -1px; } .ambox th.mbox-text, .ambox td.mbox-text { /* The message body cell(s) */ padding: 0.25em 0.5em; /* 0.5em left/right */ } .ambox td.mbox-image { /* The left image cell */ /* @noflip */ padding: 2px 0 2px 0.5em; /* 0.5em left, 0px right */ } .ambox td.mbox-imageright { /* The right image cell */ /* @noflip */ padding: 2px 0.5em 2px 0; /* 0px left, 0.5em right */ } table.ambox-notice { /* @noflip */ border-left: 10px solid #36c; /* Blue */ } table.ambox-speedy { /* @noflip */ border-left: 10px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } table.ambox-delete { /* @noflip */ border-left: 10px solid #b32424; /* Red */ } table.ambox-content { /* @noflip */ border-left: 10px solid #f28500; /* Orange */ } table.ambox-style { /* @noflip */ border-left: 10px solid #fc3; /* Yellow */ } table.ambox-move { /* @noflip */ border-left: 10px solid #9932cc; /* Purple */ } table.ambox-protection { /* @noflip */ border-left: 10px solid #a2a9b1; /* Gray-gold */ } /* Image message box styles */ table.imbox { margin: 4px 10%; border-collapse: collapse; border: 3px solid #36c; /* Default "notice" blue */ background-color: #fbfbfb; box-sizing: border-box; } .imbox .mbox-text .imbox { /* For imboxes inside imbox-text cells. */ margin: 0 -0.5em; /* 0.9 - 0.5 = 0.4em left/right. */ display: block; /* Fix for webkit to force 100% width. */ } .mbox-inside .imbox { /* For imboxes inside other templates. */ margin: 4px; } table.imbox-notice { border: 3px solid #36c; /* Blue */ } table.imbox-speedy { border: 3px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } table.imbox-delete { border: 3px solid #b32424; /* Red */ } table.imbox-content { border: 3px solid #f28500; /* Orange */ } table.imbox-style { border: 3px solid #fc3; /* Yellow */ } table.imbox-move { border: 3px solid #9932cc; /* Purple */ } table.imbox-protection { border: 3px solid #a2a9b1; /* Gray-gold */ } table.imbox-license { border: 3px solid #88a; /* Dark gray */ background-color: #f7f8ff; /* Light gray */ } table.imbox-featured { border: 3px solid #cba135; /* Brown-gold */ } /* Category message box styles */ table.cmbox { margin: 3px 10%; border-collapse: collapse; border: 1px solid #a2a9b1; background-color: #dfe8ff; /* Default "notice" blue */ box-sizing: border-box; } table.cmbox-notice { background-color: #d8e8ff; /* Blue */ } table.cmbox-speedy { margin-top: 4px; margin-bottom: 4px; border: 4px solid #b32424; /* Red */ background-color: #ffdbdb; /* Pink */ } table.cmbox-delete { background-color: #ffdbdb; /* Pink */ } table.cmbox-content { background-color: #ffe7ce; /* Orange */ } table.cmbox-style { background-color: #fff9db; /* Yellow */ } table.cmbox-move { background-color: #e4d8ff; /* Purple */ } table.cmbox-protection { background-color: #efefe1; /* Gray-gold */ } /* Other pages message box styles */ table.ombox { margin: 4px 10%; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; } table.ombox-notice { border: 1px solid #a2a9b1; /* Gray */ } table.ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } table.ombox-delete { border: 2px solid #b32424; /* Red */ } table.ombox-content { border: 1px solid #f28500; /* Orange */ } table.ombox-style { border: 1px solid #fc3; /* Yellow */ } table.ombox-move { border: 1px solid #9932cc; /* Purple */ } table.ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } /* Talk page message box styles */ table.tmbox { margin: 4px 10%; border-collapse: collapse; border: 1px solid #c0c090; /* Default "notice" gray-brown */ background-color: #f8eaba; min-width: 80%; box-sizing: border-box; } .tmbox.mbox-small { min-width: 0; /* reset the min-width of tmbox above */ } .mediawiki .mbox-inside .tmbox { /* For tmboxes inside other templates. The "mediawiki" class ensures that */ margin: 2px 0; /* this declaration overrides other styles (including mbox-small above) */ width: 100%; /* For Safari and Opera */ } .mbox-inside .tmbox.mbox-small { /* "small" tmboxes should not be small when */ line-height: 1.5em; /* also "nested", so reset styles that are */ font-size: 100%; /* set in "mbox-small" above. */ } table.tmbox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } table.tmbox-delete { border: 2px solid #b32424; /* Red */ } table.tmbox-content { border: 2px solid #f28500; /* Orange */ } table.tmbox-style { border: 2px solid #fc3; /* Yellow */ } table.tmbox-move { border: 2px solid #9932cc; /* Purple */ } table.tmbox-protection, table.tmbox-notice { border: 1px solid #c0c090; /* Gray-brown */ } /* Footer and header message box styles */ table.fmbox { clear: both; margin: 0.2em 0; width: 100%; border: 1px solid #a2a9b1; background-color: #f8f9fa; /* Default "system" gray */ box-sizing: border-box; } table.fmbox-system { background-color: #f8f9fa; } table.fmbox-warning { border: 1px solid #bb7070; /* Dark pink */ background-color: #ffdbdb; /* Pink */ } table.fmbox-editnotice { background-color: transparent; } /* These mbox-small classes must be placed after all other ambox/tmbox/ombox etc classes. "html body.mediawiki" is so they override "table.ambox + table.ambox" above. */ html body.mediawiki .mbox-small { /* For the "small=yes" option. */ /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; box-sizing: border-box; width: 238px; font-size: 88%; line-height: 1.25em; } html body.mediawiki .mbox-small-left { /* For the "small=left" option. */ /* @noflip */ margin: 4px 1em 4px 0; box-sizing: border-box; overflow: hidden; width: 238px; border-collapse: collapse; font-size: 88%; line-height: 1.25em; } /* Remove underlines from certain links */ .nounderlines a, .IPA a:link, .IPA a:visited { text-decoration: none !important; } /* Prevent line breaks in silly places where desired (nowrap) and links when we don't want them to (nowraplinks a) */ .nowrap, .nowraplinks a { white-space: nowrap; } /* But allow wrapping where desired: */ .wrap, .wraplinks a { white-space: normal; } /* texhtml class for inline math (based on generic times-serif class) */ span.texhtml { font-family: "Nimbus Roman No9 L", "Times New Roman", Times, serif; font-size: 118%; line-height: 1; white-space: nowrap; /* Force tabular and lining display for texhtml */ -webkit-font-feature-settings: "lnum", "tnum", "kern" 0; font-feature-settings: "lnum", "tnum", "kern" 0; font-variant-numeric: lining-nums tabular-nums; font-kerning: none; } span.texhtml span.texhtml { font-size: 100%; } @media screen { .nochecker .gallerybox .thumb img { background-image: none; } } /* Put anything you mean to be a sitewide addition above the TemplateStyles * comment above. */ 96044b1ee521841a211430af45e5821dbe0125d9 Template:Center 10 6 8 7 2022-07-12T15:19:40Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly><div class="center" style="width:auto; margin-left:auto; margin-right:auto;{{#if: {{{style|}}} | {{{style}}};}}">{{{1|[[Category:Pages using center with no arguments]]}}}</div></includeonly><noinclude> {{documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 1bcdac1c025611248a10a1f17cdfdedcc3b1d6c1 Template:Collapse bottom 10 8 12 11 2022-07-12T15:19:42Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly>|}</div></includeonly><noinclude> {{Documentation|Template:Collapse top/doc}} <!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> </noinclude> 64b210e8ab0882b262da50e9fbccf2132bc34fab Template:Collapsible list 10 10 16 15 2022-07-12T15:19:43Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:collapsible list|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> aff61df28bcc6c3457d6aa36ada4fffe68c409a9 Template:Documentation subpage 10 12 20 19 2022-07-12T15:19:45Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly><!-- -->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}} | <!--(this template has been transcluded on a /doc or /{{{override}}} page)--> </includeonly><!-- -->{{#ifeq:{{{doc-notice|show}}} |show | {{Mbox | type = notice | style = margin-bottom:1.0em; | image = [[File:Edit-copy green.svg|40px|alt=|link=]] | text = {{strong|This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]]}} for {{terminate sentence|{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}}}<br />It contains usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} |{{#ifeq:{{SUBJECTSPACE}} |{{ns:User}} |{{lc:{{SUBJECTSPACE}}}} template page |{{#if:{{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}}}}}}}. }} }}<!-- -->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!-- -->{{#if:{{{inhibit|}}} |<!--(don't categorize)--> | <includeonly><!-- -->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}} | [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | [[Category:Documentation subpages without corresponding pages]] }}<!-- --></includeonly> }}<!-- (completing initial #ifeq: at start of template:) --><includeonly> | <!--(this template has not been transcluded on a /doc or /{{{override}}} page)--> }}<!-- --></includeonly><noinclude>{{Documentation}}</noinclude> 932915be87123dcf74687ffca846a3130a6a52af Template:Hidden begin 10 13 22 21 2022-07-12T15:19:45Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly><div class="mw-collapsible {{#ifeq:{{{showhide|}}}{{{toggle|}}}|left|mw-collapsible-leftside-toggle}} {{#if:{{{expanded|}}} | |mw-collapsed}} {{{class|}}}" style="box-sizing:border-box;width:{{{width|100%}}};font-size:95%;padding:4px;border:{{{border|none}}};{{{style|}}}"><!-- --><div style="font-size:100%;line-height:1.6;font-weight:bold;background:{{{bg1|transparent}}};text-align:{{{ta1|left}}};{{{extra1|}}};{{{titlestyle|{{{headercss|}}}}}}">{{{header|}}}{{{title|}}}</div><!-- --><div class="mw-collapsible-content" style="background:{{{bg2|transparent}}};text-align:{{{ta2|left}}};{{{extra2|}}};{{{bodystyle|{{{contentstyle|{{{contentcss|}}}}}}}}}"></includeonly><noinclude> {{Documentation}} </noinclude> f2cf6827b1f6c54d325bd1bfb6d6a63fbf979b40 Template:Hidden end 10 14 24 23 2022-07-12T15:19:46Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <noinclude>{{hatnote|Templates {{noredirect|Template:End hidden|End hidden}} and {{noredirect|Template:End hidden section|End hidden section}} redirect here.}}<div><div></noinclude><!-- --></div></div><!-- --><noinclude>{{Documentation|Template:Hidden begin/doc}}</noinclude> 2f3def935d96317afd11ab0e072d64fd91d9c575 Template:If empty 10 15 26 25 2022-07-12T15:19:47Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:If empty|main}}<noinclude>{{Documentation}}</noinclude> 745940b7bdde8a1585c887ee4ee5ce81d98461a4 Template:Ifsubst 10 16 28 27 2022-07-12T15:19:47Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{ safesubst:<noinclude/>#if:{{{demo|}}} |{{ safesubst:<noinclude/>#ifeq:{{{demo}}} |no |{{{no|{{{2|}}}}}} |{{{yes|{{{1|}}}}}} }} |{{ safesubst:<noinclude/>#ifeq:{{ safesubst:<noinclude/>NAMESPACE}}|{{NAMESPACE}} |{{{no|{{{2|}}}}}} |{{{yes|{{{1|}}}}}} }}}}<noinclude> {{Documentation}} </noinclude> 38e667b5df326086489bf557a5f7c4e43393af78 Template:Infobox 10 17 30 29 2022-07-12T15:19:48Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#invoke:Infobox|infobox}}<includeonly>{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Category:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}</includeonly><noinclude> {{documentation}} <!-- Categories go in the /doc subpage, and interwikis go in Wikidata. --> </noinclude> 817a9f5b6524eced06a57bd1d5fd7179f9369bf2 Template:Infobox legislation/doc 10 18 32 31 2022-07-12T15:19:49Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{Documentation subpage}} {{Lua|Module:InfoboxImage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> == Usage == {{Parameter names example |short_title |legislature |image |imagesize |image_upright |imagealt |caption |long_title |citation |territorial_extent |considered_by |enacted_by |date_enacted |date_passed |considered_by2 |enacted_by2 |date_enacted2 |date_passed2 |date_assented |royal_assent |assented_by |date_signed |signed_by |date_vetoed |vetoed_by |veto_type |veto_overridden |reference_holding |date_pocket_vetoed |date_became_law_by_inaction |date_commenced |date_effective |date_of_expiry |date_repealed |administered_by |bill |bill_citation |bill_date |introduced_by |1st_reading |2nd_reading |committee_whole |3rd_reading |conf_committee_passed |committee_report |bill2 |bill_citation2 |bill_date2 |introduced_by2 |1st_reading2 |2nd_reading2 |committee_whole2 |3rd_reading2 |conf_committee_passed2 |committee_report2 |date_conf_committee |white_paper |date_amendments_considered |date_final_passage |amends |repeals |amended_by |repealed_by |related_legislation |summary |keywords |status }} This template summarizes information about a piece of [[legislation]] or a [[bill (law)|bill]]. It is designed to be generic so that it can be used for the bills, [[statute]]s and subsidiary legislation ([[delegated legislation]]) of any [[jurisdiction]]. If you have suggestions as to how the template may be improved, please leave a message on the [[Template talk:Infobox legislation|talk page]]. Specific infoboxes for European Union, United Kingdom (national and devolved) and United States (federal only) legislation are at {{tl|Infobox EU legislation}}, {{tl|Infobox UK legislation}} and {{tl|Infobox U.S. legislation}} respectively (although this template also supports the latter two to a limited extent). ===Legislation enacted by a legislature (e.g. an Act of Parliament/Congress)=== See next section for bills that did not pass or is still being considered by the legislature. {{Hidden begin|title=Click [show] to view}} <pre style="overflow:auto"> {{Infobox legislation |short_title = |legislature = <!-- Name of enacting legislature, wikilinked. Autofills image if available. --> |image = |imagesize = |image_upright = |imagealt = |caption = |long_title = |citation = |territorial_extent = |enacted_by = <!-- For bicameral legislatures, this is the chamber the bill was first introduced. --> |date_enacted = <!-- Pick one of date_enacted or date_passed as appropriate in jurisdiction. --> |date_passed = <!-- Pick one of date_enacted or date_passed as appropriate in jurisdiction. --> |enacted_by2 = <!-- For bicameral legislatures only. Use if bill passed the second chamber. --> |date_enacted2 = <!-- For bicameral legislatures only. Pick one of date_enacted2 or date_passed2 as appropriate in jurisdiction. --> |date_passed2 = <!-- For bicameral legislatures only. Pick one of date_enacted2 or date_passed2 as appropriate in jurisdiction. --> |date_assented = <!-- Pick none or one of date_assented, royal_assent or date_signed as appropriate in jurisdiction. --> |assented_by = <!-- Only use if date_assented or royal_assent is used. --> |royal_assent = <!-- Pick none or one of date_assented, royal_assent or date_signed as appropriate in jurisdiction. --> |date_signed = <!-- Pick none or one of date_assented, royal_assent or date_signed as appropriate in jurisdiction. --> |signed_by = <!-- Only use if date_signed is used. --> <-- Use date_vetoed, vetoed_by, veto_type, veto_overridden, and reference_holding if bill was vetoed but the veto was overridden, or, for constitutional vetoes, the constitutional court held that the bill is constitutional. --> |date_vetoed = <!-- For jurisdiction where a veto is used. --> |vetoed_by = <!-- Only use if date_vetoed is used. --> |veto_type = <!-- Only use if the jurisdiction allows for several types of veto, e.g. returning a bill to the legislature or referring it to a constitutional court. Pocket vetoes should not be placed here. --> |veto_overridden = <!-- Date on which the veto was overridden. Pocket vetoes and constitutional vetoes should not be placed here; however, if the veto results in a referendum on the bill, the date of that referendum should be here, with a wiki link where possible. --> |reference_holding = <!-- For jurisdictions where a constitutional veto (a bill is referred to the supreme or constitutional court) is used. The holding of the court as to the constitutionality of a bill; wikilink or external link to the ruling where possible. --> |date_became_law_by_inaction = <!-- For jurisdiction where a pocket approval is used (e.g. if no action is taken on a bill after it is presented to the head of state, it becomes law automatically). --> |date_commenced = <!-- Pick one of date_commenced or date_effective as appropriate in jurisdiction. --> |date_effective = <!-- Pick one of date_commenced or date_effective as appropriate in jurisdiction. --> |date_of_expiry = |date_repealed = |administered_by = |bill = <!-- Name of relevant bill debated in the chamber listed in enacted_by or considered_by. Omit if the legislation is still a bill in this chamber and the bill name used in short_title. --> |bill_citation = |bill_date = |introduced_by = <!-- Name of member introducing the bill in the chamber. --> |1st_reading = |2nd_reading = <!-- Specify date range for multi-day readings. --> |committee_whole_label = |committee_whole = |3rd_reading = |conf_committee_passed = |committee_report = |bill2 = <!-- For bicameral legislatures only. Name of relevant bill debated in the chamber listed in enacted_by2 or considered_by2. --> |bill_citation2 = <!-- For bicameral legislatures only. --> |bill_date2 = <!-- For bicameral legislatures only. --> |introduced_by2 = <!-- For bicameral legislatures only. Name of member introducing the bill in the chamber. --> |1st_reading2 = <!-- For bicameral legislatures only. --> |2nd_reading2 = <!-- For bicameral legislatures only. Specify date range for multi-day readings. --> |committee_whole_label2 = <!-- For bicameral legislatures only. --> |committee_whole2 = <!-- For bicameral legislatures only. --> |3rd_reading2 = <!-- For bicameral legislatures only. --> |conf_committee_passed2 = <!-- For bicameral legislatures only. --> |committee_report2 = <!-- For bicameral legislatures only. --> |date_conf_committee = |white_paper = |date_amendments_considered = <!-- For bicameral legislatures only. --> |date_final_passage = <!-- For bicameral legislatures only. --> |amends = <!-- Citations of other notable legislation that this legislation amends; wikilink or external link where possible. --> |repeals = <!-- Citations of other notable legislation that this legislation repeals; wikilink or external link where possible. --> |amended_by = <!-- Citations of other notable legislation that amends this legislation; wikilink or external link where possible. --> |repealed_by = <!-- Citation of the legislation that repealed this legislation; wikilink or external link if possible. --> |related_legislation = <!-- Names and citations of any other related legislation; wikilink name and external link citation where possible. --> |summary = |keywords = |status = <!-- not yet in force/not fully in force/current/in force/amended/expired/spent/repealed/struck down/halted/void/void ab initio --> }} </pre> {{Hidden end}} ===Proposed legislation considered (but failed) or in consideration by a legislature (e.g. a bill)=== {{Hidden begin|title=Click [show] to view}} <pre style="overflow:auto"> {{Infobox legislation |short_title = <!-- Name of bill. --> |legislature = <!-- Name of considering legislature, wikilinked. Autofills image if available. --> |image = |imagesize = |image_upright = |imagealt = |caption = |long_title = |citation = <!-- Citation of bill. --> |territorial_extent = |considered_by = <!-- Use if bill did not pass or hasn't been passed by the chamber (for bicameral legislatures, this is the chamber the bill was first introduced). --> |enacted_by = <!-- Use if bill passed the chamber but was vetoed or have not yet received assent, or, for bicameral legislatures, did not pass or have not yet passed the second chamber. --> |date_enacted = <!-- Pick one of date_enacted or date_passed as appropriate in jurisdiction. Only use if enacted_by is used. --> |date_passed = <!-- Pick one of date_enacted or date_passed as appropriate in jurisdiction. Only use if enacted_by is used. --> |considered_by2 = <!-- For bicameral legislatures only. Use if bill did not pass or hasn't been passed by the second chamber. --> |enacted_by2 = <!-- For bicameral legislatures only. Use if bill passed the second chamber but was vetoed or have not yet received assent. --> |date_enacted2 = <!-- For bicameral legislatures only. Pick one of date_enacted2 or date_passed2 as appropriate in jurisdiction. Only use if enacted_by2 is used. --> |date_passed2 = <!-- For bicameral legislatures only. Pick one of date_enacted2 or date_passed2 as appropriate in jurisdiction. Only use if enacted_by2 is used. --> |date_vetoed = <!-- For jurisdiction where a veto is used. --> |vetoed_by = <!-- Only use if date_vetoed is used. --> |veto_type = <!-- Only use if the jurisdiction allows for several types of veto, e.g. returning a bill to the legislature or referring it to a constitutional court. Pocket vetoes should not be placed here. --> |reference_holding = <!-- For jurisdictions where a constitutional veto (a bill is referred to the supreme or constitutional court) is used. The holding of the court as to the constitutionality of a bill; wikilink or external link to the ruling where possible. --> |date_pocket_vetoed = <!-- For jurisdiction where a pocket veto is used (e.g. if no action is taken on a bill after it is presented to the head of state, it is killed automatically). --> |bill = <!-- Name of relevant bill debated in the chamber listed in enacted_by or considered_by. Omit if the legislation is still a bill in this chamber and the bill name used in short_title. --> |bill_citation = |bill_date = |introduced_by = <!-- Name of member introducing the bill in the chamber. --> |1st_reading = |2nd_reading = <!-- Specify date range for multi-day readings. --> |committee_whole_label = |committee_whole = |3rd_reading = |conf_committee_passed = |committee_report = |bill2 = <!-- For bicameral legislatures only. Name of relevant bill debated in the chamber listed in enacted_by2 or considered_by2. --> |bill_citation2 = <!-- For bicameral legislatures only. --> |bill_date2 = <!-- For bicameral legislatures only. --> |introduced_by2 = <!-- For bicameral legislatures only. Name of member introducing the bill in the chamber. --> |1st_reading2 = <!-- For bicameral legislatures only. --> |2nd_reading2 = <!-- For bicameral legislatures only. Specify date range for multi-day readings. --> |committee_whole_label2 = <!-- For bicameral legislatures only. --> |committee_whole2 = <!-- For bicameral legislatures only. --> |3rd_reading2 = <!-- For bicameral legislatures only. --> |conf_committee_passed2 = <!-- For bicameral legislatures only. --> |committee_report2 = <!-- For bicameral legislatures only. --> |date_conf_committee = |white_paper = |date_amendments_considered = <!-- For bicameral legislatures only. --> |date_final_passage = <!-- For bicameral legislatures only. --> |amends = <!-- Citations of other notable legislation that this legislation amends; wikilink or external link where possible. --> |repeals = <!-- Citations of other notable legislation that this legislation repeals; wikilink or external link where possible. --> |related_legislation = <!-- Names and citations of any other related legislation; wikilink name and external link citation where possible. --> |summary = |keywords = |status = <!-- pending/not passed/vetoed/withdrawn/blocked --> }} </pre> {{Hidden end}} ===Legislation enacted or considered without going through a legislature (e.g. a regulation or an order)=== {{Hidden begin|title=Click [show] to view}} <pre style="overflow:auto"> {{Infobox legislation |short_title = |legislature = <!-- Name of considering or enacting body (e.g. Government of Australia), wikilinked. --> |image = |imagesize = |image_upright = |imagealt = |caption = |long_title = |citation = |territorial_extent = |considered_by = <!-- Name of considering authority. Use if legislation wasn't enacted for some reason, or if it is still being considered. --> |enacted_by = <!-- Name of enacting authority. Use if legislation was enacted. --> |date_enacted = <!-- Pick one of date_enacted or date_passed as appropriate in jurisdiction. Only use if enacted_by is used. --> |date_passed = <!-- Pick one of date_enacted or date_passed as appropriate in jurisdiction. Only use if enacted_by is used. --> |date_assented = <!-- Pick none or one of date_assented, royal_assent or date_signed as appropriate in jurisdiction. --> |royal_assent = <!-- Pick none or one of date_assented, royal_assent or date_signed as appropriate in jurisdiction. --> |date_signed = <!-- Pick none or one of date_assented, royal_assent or date_signed as appropriate in jurisdiction. --> |signed_by = <!-- Only use if date_signed is used. --> |date_commenced = <!-- Pick one of date_commenced or date_effective as appropriate in jurisdiction. --> |date_effective = <!-- Pick one of date_commenced or date_effective as appropriate in jurisdiction. --> |date_of_expiry = |date_repealed = |administered_by = |white_paper = |amends = <!-- Citations of other notable legislation that this legislation amends; wikilink or external link where possible. --> |repeals = <!-- Citations of other notable legislation that this legislation repeals; wikilink or external link where possible. --> |amended_by = <!-- Citations of other notable legislation that amends this legislation; wikilink or external link where possible. --> |repealed_by = <!-- Citation of the legislation that repealed this legislation; wikilink or external link if possible. --> |related_legislation = <!-- Names and citations of any other related legislation; wikilink name and external link citation where possible. --> |summary = |keywords = |status = <!-- pending/withdrawn/blocked/not yet in force/not fully in force/current/in force/amended/expired/spent/repealed/struck down/halted/void/void ab initio --> }} </pre> {{Hidden end}} ===All available parameters=== {{Hidden begin||title=Click [show] to view}} <pre style="overflow:auto"> {{Infobox legislation |short_title = |legislature = <!-- Name of enacting legislature, wikilinked. Autofills image if available. --> |image = |imagesize = |image_upright = |imagealt = |caption = |long_title = |citation = |territorial_extent = |considered_by = <!-- Use if bill did not pass or hasn't been passed by the chamber (for bicameral legislatures, this is the chamber the bill was first introduced). --> |enacted_by = <!-- Use if bill passed the chamber (for bicameral legislatures, this is the chamber the bill was first introduced). --> |date_enacted = <!-- Pick one of date_enacted or date_passed as appropriate in jurisdiction. Only use if enacted_by is used. --> |date_passed = <!-- Pick one of date_enacted or date_passed as appropriate in jurisdiction. Only use if enacted_by is used. --> |considered_by2 = <!-- For bicameral legislatures only. Use if bill did not pass or hasn't been passed by the second chamber. --> |enacted_by2 = <!-- For bicameral legislatures only. Use if bill passed the second chamber. --> |date_enacted2 = <!-- For bicameral legislatures only. Pick one of date_enacted2 or date_passed2 as appropriate in jurisdiction. Only use if enacted_by2 is used. --> |date_passed2 = <!-- For bicameral legislatures only. Pick one of date_enacted2 or date_passed2 as appropriate in jurisdiction. Only use if enacted_by2 is used. --> |date_assented = <!-- Pick none or one of date_assented, royal_assent or date_signed as appropriate in jurisdiction. --> |assented_by = <!-- Only use if date_assented or royal_assent is used. --> |royal_assent = <!-- Pick none or one of date_assented, royal_assent or date_signed as appropriate in jurisdiction. --> |date_signed = <!-- Pick none or one of date_assented, royal_assent or date_signed as appropriate in jurisdiction. --> |signed_by = <!-- Only use if date_signed is used. --> |date_vetoed = <!-- For jurisdiction where a veto is used. --> |vetoed_by = <!-- Only use if date_vetoed is used. --> |veto_type = <!-- Only use if the jurisdiction allows for several types of veto, e.g. returning a bill to the legislature or referring it to a constitutional court. Pocket vetoes should not be placed here. --> |veto_overridden = <!-- Date on which the veto was overridden. Pocket vetoes and constitutional vetoes should not be placed here; however, if the veto results in a referendum on the bill, the date of that referendum should be here, with a wiki link where possible. --> |reference_holding = <!-- For jurisdictions where a constitutional veto (a bill is referred to the supreme or constitutional court) is used. The holding of the court as to the constitutionality of a bill; wikilink or external link to the ruling where possible. --> |date_pocket_vetoed = <!-- For jurisdiction where a pocket veto is used (e.g. if no action is taken on a bill after it is presented to the head of state, it is killed automatically). --> |date_became_law_by_inaction = <!-- For jurisdiction where a pocket approval is used (e.g. if no action is taken on a bill after it is presented to the head of state, it becomes law automatically). --> |date_commenced = <!-- Pick one of date_commenced or date_effective as appropriate in jurisdiction. --> |date_effective = <!-- Pick one of date_commenced or date_effective as appropriate in jurisdiction. --> |date_of_expiry = |date_repealed = |administered_by = |bill = <!-- Name of relevant bill debated in the chamber listed in enacted_by or considered_by. Omit if the legislation is still a bill in this chamber and the bill name used in short_title. --> |bill_citation = |bill_date = |introduced_by = <!-- Name of member introducing the bill in the chamber. --> |1st_reading = |2nd_reading = |committee_whole_label = |committee_whole = |3rd_reading = |conf_committee_passed = |committee_report = |bill2 = <!-- For bicameral legislatures only. Name of relevant bill debated in the chamber listed in enacted_by2 or considered_by2. --> |bill_citation2 = <!-- For bicameral legislatures only. --> |bill_date2 = <!-- For bicameral legislatures only. --> |introduced_by2 = <!-- For bicameral legislatures only. Name of member introducing the bill in the chamber. --> |1st_reading2 = <!-- For bicameral legislatures only. --> |2nd_reading2 = <!-- For bicameral legislatures only. --> |committee_whole_label2 = <!-- For bicameral legislatures only. --> |committee_whole2 = <!-- For bicameral legislatures only. --> |3rd_reading2 = <!-- For bicameral legislatures only. --> |conf_committee_passed2 = <!-- For bicameral legislatures only. --> |committee_report2 = <!-- For bicameral legislatures only. --> |date_conf_committee = |white_paper = |date_amendments_considered = <!-- For bicameral legislatures only. --> |date_final_passage = <!-- For bicameral legislatures only. --> |amends = <!-- Citations of other notable legislation that this legislation amends; wikilink or external link where possible. --> |repeals = <!-- Citations of other notable legislation that this legislation repeals; wikilink or external link where possible. --> |amended_by = <!-- Citations of other notable legislation that amends this legislation; wikilink or external link where possible. --> |repealed_by = <!-- Citation of the legislation that repealed this legislation; wikilink or external link if possible. --> |related_legislation = <!-- Names and citations of any other related legislation; wikilink name and external link citation where possible. --> |summary = |keywords = |status = <!-- pending/not passed/vetoed/withdrawn/blocked/not yet in force/not fully in force/current/in force/amended/expired/spent/repealed/struck down/halted/void/void ab initio --> }} </pre> {{Hidden end}} ==Parameters== This infobox takes a number of parameters, which are all optional: {|class="wikitable" |- !Parameter !Description |- |colspan="2" bgcolor="silver"|'''Basic information''' |- | style="text-align:center;" |'''short_title''' |The [[short title]] of the legislation or bill, which should preferably be the same as the article title. If the parameter is left blank or omitted, the article name is used. |- | style="text-align:center;" |'''legislature''' |The name of the [[legislature]] that enacted the legislation. You only need to use this parameter if the legislature of the jurisdiction in question is [[bicameralism|bicameral]], and you wish to state its name rather than just the names of the [[upper house]] and [[lower house]], which can be specified using {{para|enacted_by}} and {{para|enacted_by2}}. |- | style="text-align:center;" |'''image''' |An image to represent the person or institution that enacted the legislation, such as a [[coat of arms]], a [[seal (emblem)|seal]] or a photograph of a building. Type the name of the image without the "{{mono|File:}}" prefix and do not [[Help:Link|wikilink]] it. If you omit this parameter, the template automatically displays an image according to the scheme at {{tl|Infobox legislation/images}}. |- | style="text-align:center;" |'''imagesize''' |The width of the image in [[pixel]]s (px), particularly if it is less than 180 px. Type the number without the "px" suffix ("{{mono|150}}", not "{{mono|150px}}"). If this parameter is left blank or omitted, the image size defaults to 180 px. |- | style="text-align:center;" |'''image_upright''' |Scale factor for the image, particularly to scale tall, narrow images correctly. See [[Help:Pictures#Upright_images]] for more information. |- | style="text-align:center;" |'''imagealt''' |[[Wikipedia:Extended image syntax#Alt text and caption|Alt text]] for the image. For more information, see "[[Wikipedia:Alternative text for images]]". |- | style="text-align:center;" |'''caption''' |A caption for the image. Terms in the caption can be wikilinked, if desired. |- | style="text-align:center;" |'''long_title''' |The [[long title]] of the legislation. |- | style="text-align:center;" |'''citation''' |The citation of the legislation. If the legislation is available online, use a [[:Category:Law citation templates|citation template]] where available to generate an external link automatically, or else [[Help:Link#External links|create a link manually]]. If the citation uses square brackets, replace them with {{mono|&amp;#91;}} and {{mono|&amp;#93;}} when putting them inside an external link. |- | style="text-align:center;" |'''territorial_extent''' |The territorial area(s) to which the legislation extends or applies. If possible, provide a wikilink. |- | style="text-align:center;" |'''considered_by<br />enacted_by''' |The name of the person or institution that considered or enacted the legislation. {{para|considered_by}} is used for proposed or failed legislation (e.g. bills) in which the institution did not or has not enacted the legislation, and {{para|enacted_by}} for successful ones. Wikilink the name to a Wikipedia article about the person or institution, if there is one. In a bicameral jurisdiction, use this parameter to specify the legislative chamber that initiated the legislation. |- | style="text-align:center;" |'''date_enacted<br />date_passed''' |The date the legislation was enacted or passed. Select either {{para|date_enacted}} or {{para|date_passed}} depending on whether the term ''enacted'' or ''passed'' is customarily used in the jurisdiction. In line with "[[Wikipedia:Manual of Style (dates and numbers)#Linking and autoformatting of dates]]", do not wikilink dates. |- | style="text-align:center;" |'''considered_by2<br />enacted_by2<br />date_enacted2<br />date_passed2''' |In a bicameral legislature, use these parameters to specify the name of the legislative chamber that considered the legislation after it was initiated by the other chamber, and the date when the second chamber enacted or passed the legislation. |- | style="text-align:center;" |'''date_assented<br />royal_assent<br />date_signed''' |Use one of the following: #{{para|date_assented}} – to indicate the date when a [[head of state]] or their representative gives formal assent to the legislation. #{{para|royal_assent}} – to indicate the date when a [[constitutional monarchy|constitutional monarch]] gives [[royal assent]] to legislation. #{{para|date_signed}} – to indicate the date when a president (''e.g.'', the [[President of the United States]]) a state governor (''e.g.'', the [[governor (United States)|governor of one of the US states]]) or a [[constitutional monarchy|constitutional monarch]] without royal assent powers (''e.g.'', the [[Grand Duke of Luxembourg]]), signs a piece of legislation, and the signer's identity. Do not use parameter(s) from two or three of the above categories together. |- | style="text-align:center;" |'''assented_by<br />signed_by''' |Use one of the following: #{{para|assented_by}} – to indicate the assenter's identity where {{para|date_assented}} or {{para|royal_assent}} is used. #{{para|signed_by}} – to indicate the signer's identity where {{para|date_signed}} is used. Do not use parameter(s) from two of the above categories together. |- | style="text-align:center;" |'''date_vetoed''' |The date when the legislation was [[vetoed]] by the [[head of state]] or their representative. This does not apply to a [[pocket veto]]. |- | style="text-align:center;" |'''veto_type''' |The type of veto applied to the law, if the [[head of state]] or their representative has the right to veto the bill in multiple ways. This does not apply to a [[pocket veto]]. Use one of the following: #Absolute – to indicate a veto which cannot be overridden (''e.g.'', withholding of royal assent by the [[Monarch of the United Kingdom]], or a final veto by the [[President of Cyprus]]). #Package – to indicate a veto where the entire bill is returned to the legislature for reconsideration. #Line-item – to indicate a veto where only a part of the bill is returned to the legislature for reconsideration. #Referendum – to indicate a veto where the bill is submitted to a referendum (''e.g.'', a reservation of the bill to the significance of the people by the [[President of Ireland]]). #Constitutional – to indicate a veto where the bill is referred to the supreme or constitutional court, or other authority with [[judicial review]] powers, to determine its constitutionality. |- | style="text-align:center;" |'''veto_overridden''' |The date when the veto was [[veto override|overridden]]: #If the veto involves returning the bill to the legislature, this is the date of the legislative vote to override the veto. If the legislative debates are available online, create external links to them. #If the veto involves submitting the bill to a referendum, this is the date of the referendum on that bill. Create an internal link to that Referendum's article. This does not apply to a [[pocket veto]] or a constitutional veto. |- | style="text-align:center;" |'''reference_holding''' |The decision of the supreme or constitutional court, or other authority with [[judicial review]] powers, on a vetoed bill referred to it. Create an internal link to the court ruling's article; if no such article exists but the court's decision is available online, create an external link to it. |- | style="text-align:center;" |'''date_pocket_vetoed''' |The date when the legislation was [[pocket veto]]ed by the [[head of state]] or their representative (''i.e.'' the bill became ineffective because the head of state or representative did not sign/assent or veto it within an allowed time) |- | style="text-align:center;" |'''date_became_law_by_inaction''' |The date when the legislation bill became law because the head of state or representative did not sign/assent or veto it within an allowed time. |- | style="text-align:center;" |'''date_commenced'''<br />'''date_effective''' |The date when the legislation commenced ([[coming into force|came into force]]), or [[effective date|became effective]] as law. Use the parameter that corresponds to the term customary in the jurisdiction, not both the parameters. |- | style="text-align:center;" |'''date_of_expiry''' |Date when the legislation automatically ceases to have effect (usually, but not always, when a [[Sunset clause|sunset provision]] is included). |- | style="text-align:center;" |'''date_repealed''' |Date when the legislation is repealed. Note that legislation may be repealed before or after it had expired, so this parameter is not necessarily identical to {{para|date_of_expiry}}. |- | style="text-align:center;" |'''administered_by''' |The institution administering the legislation. Not necessary for most legislation. Wikilink if possible. |- |colspan="2" bgcolor="silver"|'''Legislation history''' |- | style="text-align:center;" |'''bill''' |The name of the [[bill (law)|bill]] or proposed law when the legislation was still being considered by the institution specified in {{para|enacted_by}} or {{para|considered_by}}. Wikilink the name to an article about the bill, if there is one. In a bicameral jurisdiction, use this parameter to state the name of the bill that was introduced by the legislative chamber that initiated the legislation. |- | style="text-align:center;" |'''bill_citation''' |The citation of the bill. If the bill is available online, create an external link to it. If the citation uses square brackets, replace them with {{mono|&amp;#91;}} and {{mono|&amp;#93;}} when putting them inside an external link. |- | style="text-align:center;" |'''bill_date''' |The date when the bill was published. |- | style="text-align:center;" |'''introduced_by''' |The name of the legislator who introduced the bill. |- | style="text-align:center;" |'''1st_reading<br />2nd_reading<br />3rd_reading''' |The dates of the [[reading (legislature)#First reading|first]], [[reading (legislature)#Second reading|second]] and [[reading (legislature)#Third reading|third readings]] of the bill in the legislature. If the legislative debates are available online, create external links to them. |- | style="text-align:center;" |'''committee_whole_label<br />committee_whole''' |The name of the stage between the second and third readings where the bill is examined in detail (usually clause by clause), and the date(s) when it occurred. This is often named the "[[committee of the whole]]" (default), or sometimes the "committee stage" (Ireland, New Zealand) or "consideration in detail" (most lower houses of the bicameral parliaments in Australia). Omit if the stage was skipped (e.g. if no amendments were proposed or the chamber voted to skipped). |- | style="text-align:center;" |'''conf_committee_passed''' |In some jurisdictions, the date when the institution passed the version of the bill adopted by a [[conference committee]]. |- | style="text-align:center;" |'''committee_report''' |The name of a report issued by a legislative committee about the bill that was eventually enacted. If the report is available online, create an external link to it. |- | style="text-align:center;" |'''bill2<br />bill_citation2<br />bill_date2<br />introduced_by2<br />1st_reading2<br />2nd_reading2<br />committee_whole_label2<br />committee_whole2<br />3rd_reading2<br />conf_committee_passed2<br />committee_report2''' |In a bicameral legislature, use these parameters to specify information about the bill that was considered in one chamber after it was passed by the other chamber. |- | style="text-align:center;" |'''date_conf_committee''' |In some jurisdictions, the date when a conference committee passed a bill. This parameter should be used together with {{para|conf_committee_passed}} and {{para|conf_committee_passed2}} – use these parameters to indicate the dates when the upper and lower legislative chambers passed the version of the bill adopted by the conference committee. |- | style="text-align:center;" |'''white_paper''' |The name of a [[white paper#Government white papers|white paper]] relating to the legislation. If the white paper is available online, create an external link to it. |- | style="text-align:center;" |'''date_amendments_considered''' |In bicameral legislatures, if amendments were made to the bill by the second chamber, the date(s) when these amendments were considered by the originating chamber. |- | style="text-align:center;" |'''date_final_passage''' |In bicameral legislatures, the date when all amendments to the bill have been ultimately considered and the bill has finally passed both chambers. |- | style="text-align:center;" |'''amends''' |The citations of any notable legislation that this legislation amends. If available, wikilink the article or external link the texts of the amended legislation. |- | style="text-align:center;" |'''repeals''' |The citations of any notable legislation that this legislation repeals. If available, wikilink the article or external link the texts of the repealed legislation. |- | style="text-align:center;" |'''amended_by''' |The citations of any notable amendments to this legislation. If available, wikilink the article or external link the texts of the amendments. |- | style="text-align:center;" |'''repealed_by''' |The citations of any notable legislation repealing parts or previous versions of this legislation. If available, wikilink the article or external link the texts of the repealing legislation. |- | style="text-align:center;" |'''related_legislation''' |The names and citations of any related pieces of legislation. Where possible, link the name of a related piece of legislation to a Wikipedia article about it, and link the citation to an external website containing the text of the related legislation. |- | style="text-align:center;" |'''summary''' |A very brief summary of the subjects that the legislation deals with. |- | style="text-align:center;" |'''keywords''' |A list of [[index term|keywords]] that describe the legal issues dealt with by the legislation. List keywords alphabetically, separate them with commas, and link them to appropriate Wikipedia articles wherever possible; for example, "{{mono|<nowiki>[[Bailment]], [[common carrier]], [[negligence]], [[strict liability]]</nowiki>}}". |- |colspan="2" bgcolor="silver"|'''Status''' |- | style="text-align:center;" |'''status''' |The status of the bill or legislation. The possible values are: {| |- | *pending *not passed *vetoed *current *not yet in force *not fully in force *halted *in force | *amended *expired *repealed *spent *struck down *void *void ab initio |} If some value other than the ones above is given to {{para|status}}, "Unknown" is displayed. |} ==Examples== ===Statute=== {{Infobox legislation |short_title = Criminal Law (Temporary Provisions) Act |long_title = An Act to make temporary provisions for the maintenance of public order, the control of supplies by sea to Singapore, and the prevention of strikes and lock-outs in essential services |citation = Ordinance No. 26 of 1955, now {{Singapore legislation|cap=67|ed=2000}} |territorial_extent = Whole of [[Singapore]] |enacted_by = [[Legislative Assembly of Singapore]] |date_enacted = 22 September 1955 |date_commenced = 21 October 1955 |bill_date = 31 August 1955 |introduced_by = Chief Secretary [[William Allmond Codrington Goode]] |1st_reading = 18 August 1955 |2nd_reading = 22 September 1955 |3rd_reading = 22 September 1955 |status = in force }} <pre style="overflow:auto"> {{Infobox legislation |short_title = Criminal Law (Temporary Provisions) Act |long_title = An Act to make temporary provisions for the maintenance of public order, the control of supplies by sea to Singapore, and the prevention of strikes and lock-outs in essential services |citation = Ordinance No. 26 of 1955, now {{Singapore legislation|cap=67|ed=2000}} |territorial_extent = Whole of [[Singapore]] |enacted_by = [[Legislative Assembly of Singapore]] |date_enacted = 22 September 1955 |date_commenced = 21 October 1955 |bill_date = 31 August 1955 |introduced_by = Chief Secretary [[William Allmond Codrington Goode]] |1st_reading = 18 August 1955 |2nd_reading = 22 September 1955 |3rd_reading = 22 September 1955 |status = in force }} </pre> {{clear}} ===Statute made after overridden veto=== {{Infobox legislation |short_title = Law of Ukraine "On Administrative Procedure" |long_title = |legislature = [[Verkhovna Rada]] |passed_by = [[Verkhovna Rada]] |introduced_by = Prime Minister [[Denys Shmyhal]] |vetoed_by = President [[Volodymyr Zelenskyy]] |1st_reading = 2 September 2020 |2nd_reading = 15 November 2021 |date_vetoed = 8 December 2021 |veto_overridden = 17 February 2022 |status = in force }} <pre style="overflow:auto"> {{Infobox legislation |short_title = Law of Ukraine "On Administrative Procedure" |long_title = |passed_by = [[Verkhovna Rada]] |introduced_by = Prime Minister [[Denys Shmyhal]] |vetoed_by = President [[Volodymyr Zelenskyy]] |1st_reading = 2 September 2020 |2nd_reading = 15 November 2021 |date_vetoed = 8 December 2021 |veto_overridden = 17 February 2022 |status = in force }} </pre> {{clear}} ===Unpassed Bill=== {{Infobox legislation |short_title = Naval Aid Bill |long_title = An Act to authorize measures for increasing the effective naval forces of the Empire. |considered_by = [[Parliament of Canada]] |introduced_by = [[Robert Borden]] |1st_reading = December 5, 1912 |3rd_reading = May 15, 1913 |status = Not passed }} <pre style="overflow:auto"> {{Infobox legislation |short_title = Naval Aid Bill |long_title = An Act to authorize measures for increasing the effective naval forces of the Empire. |considered_by = [[Parliament of Canada]] |introduced_by = [[Robert Borden]] |1st_reading = December 5, 1912 |3rd_reading = May 15, 1913 |status = Not passed }} </pre> {{clear}} ==Technical information== {{Mbox|text=This section contains technical information to assist editors familiar with templates and [[:mw:Help:Extension:ParserFunctions|parser functions]] to edit this template.}} The {{para|image}} parameter in the template contains (with slight modifications) the following function: <pre style="overflow: auto"> {{#invoke:InfoboxImage|InfoboxImage|image={{#if:{{{image|}}} |{{{image}}} |{{Infobox legislation/images |image={{if empty|{{{legislature|}}}|{{{considered_by|}}}|{{{enacted_by|}}}}} |date={{{date_enacted|}}} }} }}|size={{{imagesize|}}}|sizedefault=frameless|upright={{{upright|{{{image_upright|1}}}}}}|alt={{{imagealt|}}}}} </pre> The function does the following tasks: * If the parameter {{para|image}} is used in the template, that image is displayed. * If {{para|image}} is not used, a check is done to see if the value of {{para|legislature}} or {{para|enacted_by}} is listed in {{tl|Infobox legislation/images}}. If the result is blank, then no image is displayed. If the result is an image file (the coat of arms or seal, or a photograph of a building representing the person or institution that enacted the legislation), then the image file is displayed. {{tl|Infobox legislation/images}} can be tweaked to display different images depending on the date when the legislation was decided – for help with this, leave a message on the [[Template talk:Infobox legislation|talk page]]. * If a value is specified for {{para|imagesize}}, the image is given that width; otherwise the image width defaults to "frameless". * If a value, adds {{para|upright|{{var|value}}}} to image. Values less than 1 scale the image down (0.9 = 90%); values greater than 1 scale the image up (1.15 = 115%). * In either case the image is given alt text specified by {{para|imagealt}}. [[User:Jacklee|JackLee]] came up with the first version of this function for {{tl|Infobox court case}}, but thanks are due to [[User:Thumperward|Chris Cunningham]] for coming up with a cleaner solution that works better. ==TemplateData== {{TemplateData header}} {{Collapse top|title=TemplateData}} <templatedata> { "description": "Infobox for an article about an act, statute, bill, regulation, order, measure or other legislation in any jurisdiction. European Union, United Kingdom and United States federal legislations have specialised infoboxes of their own.", "format": "{{_\n| ______________ = _\n}}\n", "params": { "short_title": { "aliases": [ "name" ], "label": "Short title", "description": "Short title of the legislation. If a bill, enter the bill's current or most recent short title.", "type": "string", "default": "{{PAGENAME}}", "suggested": true }, "image": { "label": "Image", "description": "An image representing the institution or office that enacted/is enacting the legislation, such as a coat of arms, a seal, an emblem or a photograph of the institution's building. Omit \"File:\". Overrides any automatically set image.", "type": "wiki-file-name", "default": "{{Infobox legislation/images|image={{if empty|{{legislature|}}}|{{considered_by|}}}|{{{enacted_by|}}}}}|date={{{date_enacted|}}}}}" }, "legislature": { "label": "Legislature", "type": "content", "description": "Name of the legislature or institution enacting the legislation, wikilinked. Automatically sets image if available.", "suggested": true }, "imagesize": { "aliases": [ "image_size" ], "label": "Image size", "description": "Size of the image automatically set or specified in the image parameter.", "type": "string" }, "image_upright": { "aliases": [ "upright" ], "label": "Image upright factor", "description": "Scale factor for the image specified in 'image', particularly to scale tall, narrow images correctly. See 'Help:Pictures#Upright_images' for more information.", "type": "number", "default": "1" }, "imagealt": { "label": "Image alternative text", "description": "Description of the specified image when the image cannot be rendered, or for screen readers. Strongly recommended if an image is specified.", "type": "string" }, "caption": { "label": "Image caption", "description": "Caption for the image. This explains the image or its purpose in the current context and therefore is not necessarily the same as the alt text.", "type": "content" }, "long_title": { "label": "Long title", "description": "The long \"official\" title of the legislation or bill, in jurisdictions that use them.", "type": "string", "suggested": true }, "citation": { "label": "Citation", "description": "The citation of the legislation or bill. Use a template from 'Category:Law citation templates' or manually create an external link to the legislation if available online. Replace square brackets in the citation text with &#91; and &#93;", "type": "content", "suggested": true }, "territorial_extent": { "label": "Territorial extent", "description": "The territorial area(s) to which the legislation extends or applies. Wikilink where possible.", "type": "content", "suggested": true }, "considered_by": { "label": "Considered by", "description": "The institution (usually a debate chamber) that is considering/considered the bill or proposed/failed legislation. If the bill was passed or enacted by this institution, use 'enacted_by' instead. Wikilink where possible.", "type": "content" }, "enacted_by": { "label": "Enacted by", "description": "The institution (usually a debate chamber) that enacted the legislation. For bicameral legislatures, this is the first chamber the bill was introduced in. If the legislation is still being debated by or failed to be enacted by this chamber, use 'considered_by' instead. Wikilink where possible.", "type": "content", "suggested": true }, "date_passed": { "label": "Date passed", "description": "Date when the legislation was passed by the institution specified in 'enacted_by'. Use 'date_enacted' instead if appropriate in jurisdiction, but not both.", "type": "date" }, "date_enacted": { "label": "Date enacted", "description": "Date when the legislation was enacted by the institution specified in 'enacted_by'. Use 'date_passed' instead if appropriate in jurisdiction, but not both.", "type": "date", "suggested": true }, "considered_by2": { "label": "Considered by (second chamber)", "description": "The second chamber that is considering/considered the bill or proposed/failed legislation. For bicameral legislatures only. If the bill was passed or enacted by this chamber, use 'enacted_by2' instead. Wikilink where possible.", "type": "content" }, "enacted_by2": { "label": "Enacted by (second chamber)", "description": "The second chamber that enacted the legislation. For bicameral legislatures only. If the legislation is still being debated by or failed to be enacted by this chamber, use 'considered_by2' instead. Wikilink where possible.", "type": "content" }, "date_passed2": { "label": "Date passed (second chamber)", "description": "Date when the legislation was passed by the institution specified in 'enacted_by2'. For bicameral legislatures only. Use 'date_enacted2' instead if appropriate in jurisdiction, but not both.", "type": "date" }, "date_enacted2": { "label": "Date enacted (second chamber)", "description": "Date when the legislation was enacted by the chamber specified in 'enacted_by2'. For bicameral legislatures only. Use 'date_passed2' instead if appropriate in jurisdiction, but not both.", "type": "date" }, "date_assented": { "label": "Date assented to", "description": "Date when a head of state or their representative gave formal assent to the legislation. Use 'royal_assent' or 'date_signed' instead if appropriate in jurisdiction, but not two or all three simultaneously.", "type": "date", "suggested": true }, "royal_assent": { "label": "Date of royal assent", "description": "Date when a monarch or their representative gave royal assent to the legislation. Use 'date_assented' or 'date_signed' instead if appropriate in jurisdiction, but not two or all three simultaneously.", "type": "date" }, "date_signed": { "label": "Date signed", "description": "Date when a head of state or their representative signed the legislation into law. Use 'date_assented' or 'royal_assent' instead if appropriate in jurisdiction, but not two or all three simultaneously.", "type": "date" }, "signed_by": { "label": "Signed by", "description": "Person who signed the legislation into law. Only use if 'date_signed' is used. Wikilink if possible.", "type": "content" }, "date_commenced": { "aliases": [ "commencement" ], "description": "Date when the legislation came into force. This may be different from the date of assent or signature. Use 'date_effective' instead if appropriate in jurisdiction, but not both.", "type": "date", "label": "Date commenced", "suggested": true }, "date_effective": { "label": "Date effective", "description": "Date when the legislation became effective as law. This may be different from the date of assent or signature. Use 'date_commenced' instead if appropriate in jurisdiction, but not both.", "type": "date" }, "date_of_expiry": { "label": "Date of expiry", "description": "Date when the legislation automatically ceases to have effect (usually, but not always, when a sunset provision is included).", "type": "date" }, "date_repealed": { "label": "Date repealed", "description": "Date when the legislation is repealed. Note that legislation may be repealed before or after it had expired, so this parameter is not necessarily identical to 'date_of_expiry'.", "type": "date" }, "administered_by": { "label": "Administered by", "description": "The institution administering the legislation. Not necessary for most legislation. Wikilink if possible.", "type": "content" }, "bill": { "label": "Bill name", "description": "Name of the bill or proposed law when the legislation was still being considered by the institution specified in 'enacted_by' or 'considered_by'. Omit if this is still a bill in this institution and the name is the same as the current 'short_title'.", "type": "string", "suggested": true }, "bill_date": { "label": "Date bill published", "description": "Date when the bill was published to the institution specified in 'enacted_by' or 'considered_by'.", "type": "date", "suggested": true }, "1st_reading": { "label": "First reading", "description": "Date when the bill was read a first time in the chamber specified in 'enacted_by' or 'considered_by'. If in the unlikely circumstance the bill was first read over multiple days, specify a date range.", "type": "date", "suggested": true }, "2nd_reading": { "label": "Second reading", "description": "Date(s) when the bill was read a second time in the chamber specified in 'enacted_by' or 'considered_by'. If read over multiple days, specify a date range.", "type": "date", "suggested": true }, "committee_whole_label": { "label": "Committee of the whole title", "description": "Name of the stage between the second and third readings used by the chamber specified in 'enacted_by' or 'considered_by' in which the provisions of the bill is examined in detail (usually clause by clause) and amendments by legislators are considered.", "type": "content", "suggestedvalues": [ "Consideration in detail", "Committee stage" ], "default": "[[Committee of the whole]]", "suggested": true }, "committee_whole": { "label": "Date(s) considered by committee of the whole", "description": "Date(s) when the bill and its proposed amendments were considered in detail in the chamber specified in 'enacted_by' or 'considered_by'. If considered over multiple days, specify a date range. Omit if stage was skipped.", "type": "date", "suggested": true }, "3rd_reading": { "label": "Third reading", "description": "Date when the bill was read a third time in the chamber specified in 'enacted_by' or 'considered_by'. If in the unlikely circumstance the bill was read at this stage over multiple days, specify a date range.", "type": "date", "suggested": true }, "bill_citation": { "label": "Bill citation", "description": "The citation of the bill for this legislation in the institution specified in 'enacted_by' or 'considered_by'. Omit if this is still a bill in this institution and the citation is the same as the current 'citation'. Create an external link to the bill if available online. Replace square brackets in the citation text with &#91; and &#93;", "suggested": true, "type": "content" }, "introduced_by": { "label": "Introduced by", "description": "The member of the legislature that introduced the bill into the chamber. Wikilink where possible.", "type": "content", "suggested": true }, "conf_committee_passed": { "label": "Date conference committee bill passed", "description": "Date when the version of the bill adopted by the conference committee is passed by the chamber specified in 'enacted_by' or 'considered_by', in jurisdictions that do this.", "type": "date" }, "committee_report": { "label": "Committee report name", "description": "The name of a report issued by a committee in the chamber specified in 'enacted_by' or 'considered_by' about the bill. Create an external link to the report if available online.", "type": "content" }, "bill2": { "label": "Bill name (second chamber)", "type": "string", "description": "Name of the bill or proposed law when the legislation was still being considered by the chamber specified in 'enacted_by2' or 'considered_by2'. For bicameral legislatures only." }, "bill_citation2": { "label": "Bill citation (second chamber)", "type": "content", "description": "The citation of the bill for this legislation in the second chamber. For bicameral legislatures only. Create an external link to the bill if available online. Replace square brackets in the citation text with &#91; and &#93;" }, "bill_date2": { "label": "Date bill published (second chamber)", "type": "date", "description": "Date when the bill was published to the second chamber. For bicameral legislatures only." }, "introduced_by2": { "label": "Introduced by (second chamber)", "type": "content", "description": "The member of the legislature that introduced the bill into the second chamber. For bicameral legislatures only. Wikilink where possible." }, "1st_reading2": { "label": "First reading (second chamber)", "type": "date", "description": "Date when the bill was read a first time in the second chamber. For bicameral legislatures only. If in the unlikely circumstance the bill was first read over multiple days, specify a date range." }, "2nd_reading2": { "label": "Second reading (second chamber)", "type": "date", "description": "Date(s) when the bill was read a second time in the second chamber. For bicameral legislatures only. If read over multiple days, specify a date range." }, "committee_whole_label2": { "label": "Committee of the whole title (second chamber)", "description": "Name of the stage between the second and third readings used by the second chamber in which the provisions of the bill is examined in detail (usually clause by clause) and amendments by legislators are considered. For bicameral legislatures only.", "type": "content", "suggestedvalues": [ "Consideration in detail", "Committee stage" ] }, "committee_whole2": { "label": "Date(s) considered by committee of the whole (second chamber)", "description": "Date(s) when the bill and its proposed amendments were considered in detail by the second chamber. For bicameral legislatures only. If considered over multiple days, specify a date range. Omit if stage was skipped.", "type": "date" }, "3rd_reading2": { "label": "Third reading (second chamber)", "type": "date", "description": "Date when the bill was read a third time in the second chamber. For bicameral legislatures only. If in the unlikely circumstance the bill was read at this stage over multiple days, specify a date range." }, "conf_committee_passed2": { "label": "Date conference committee bill passed (second chamber)", "type": "date", "description": "Date when the version of the bill adopted by the conference committee is passed by the second chamber, in jurisdictions that do this. For bicameral legislatures only." }, "committee_report2": { "label": "Committee report name (second chamber)", "type": "content", "description": "The name of a report issued by a committee in the second chamber about the bill. For bicameral legislatures only. Create an external link to the report if available online." }, "date_conf_committee": { "label": "Date conference committee adopted bill", "type": "date", "description": "Date when the conference committee adopted their version of the bill, in jurisdictions that do this." }, "white_paper": { "label": "White paper", "type": "content", "description": "The name of a white paper relating to the legislation. Create an external link to the white paper if available online." }, "date_amendments_considered": { "label": "Date(s) when amendments from second chamber considered by first chamber", "description": "Date(s) when amendments made by the second chamber to the bill were considered by the originating chamber. For bicameral legislatures only. If considered over multiple days, specify a date range. Omit if no amendments were made.", "type": "date" }, "date_final_passage": { "label": "Date finally passed by both chambers", "description": "Date when the bill, after consideration of amendments, is finally passed by both chambers, with or without amendment. For bicameral legislatures only. Omit if no amendments were made.", "type": "date" }, "amends": { "label": "Amends", "type": "content", "description": "List of citations of other notable legislation that this legislation amends. Wikilink or external link where possible." }, "repeals": { "label": "Repeals", "type": "content", "description": "List of citations of other notable legislation that this legislation repeals. Wikilink or external link where possible." }, "amendments": { "deprecated": "Deprecated due to ambiguity. Use amends or amended_by as appropriate.", "label": "Amended by", "type": "content", "description": "Same as 'amended_by', but this parameter is deprecated." }, "amended_by": { "label": "Amended by", "type": "content", "description": "List of citations of other notable legislation that amends this legislation. Wikilink or external link where possible." }, "repealed_by": { "label": "Repealed by", "type": "content", "description": "Citation of the legislation that repealed this legislation. Wikilink or external link if possible." }, "related_legislation": { "aliases": [ "related" ], "label": "Related legislation", "type": "content", "description": "Names and citations of any other related legislation. Wikilink name and external link citation where possible." }, "summary": { "label": "Summary", "type": "content", "description": "A very brief summary of the subjects that the legislation deals with.", "suggested": true }, "keywords": { "label": "Keywords", "type": "content", "description": "A comma-separated list of keywords that describe the legal issues dealt with by the legislation. List keywords alphabetically and wikilink them wherever possible.", "suggested": true }, "status": { "type": "string", "label": "Status", "description": "The status of the legislation or bill. Select from the following: pending/not passed/withdrawn/blocked/not yet in force/not fully in force/current/in force/amended/expired/spent/repealed/struck down/halted/void/void ab initio. Do not capitalise. Other values will generate an 'unknown' status.", "required": true } }, "paramOrder": [ "short_title", "legislature", "image", "imagesize", "image_upright", "imagealt", "caption", "long_title", "citation", "territorial_extent", "considered_by", "enacted_by", "date_enacted", "date_passed", "considered_by2", "enacted_by2", "date_enacted2", "date_passed2", "date_assented", "royal_assent", "date_signed", "signed_by", "date_commenced", "date_effective", "date_of_expiry", "date_repealed", "administered_by", "bill", "bill_citation", "bill_date", "introduced_by", "1st_reading", "2nd_reading", "committee_whole_label", "committee_whole", "3rd_reading", "conf_committee_passed", "committee_report", "bill2", "bill_citation2", "bill_date2", "introduced_by2", "1st_reading2", "2nd_reading2", "committee_whole_label2", "committee_whole2", "3rd_reading2", "conf_committee_passed2", "committee_report2", "date_conf_committee", "white_paper", "date_amendments_considered", "date_final_passage", "amends", "repeals", "amended_by", "amendments", "repealed_by", "related_legislation", "summary", "keywords", "status" ] } </templatedata> {{Collapse bottom}} <includeonly>{{Sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Law infobox templates|Legislation]] [[Category:Politics and government infobox templates|Legislation]] [[Category:Embeddable templates]] }}</includeonly> 35c1301d25cba04d5ec4a20b3990955adf2bf674 Template:Infobox legislation/images 10 19 34 33 2022-07-12T15:19:50Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly>{{#switch:{{{image|}}} <!--AUSTRALIA--> |[[Parliament of Australia]] = Australian Coat of Arms.png |[[Australian Capital Territory Legislative Assembly]] |[[Australian Capital Territory Legislative Assembly|ACT Legislative Assembly]] = Coat of Arms of the Australian Capital Territory.svg |[[Parliament of New South Wales]] = Coat of Arms of New South Wales.svg |[[Northern Territory Parliament]] = Northern Territory Legislative Assembly.jpg |[[Queensland Legislative Assembly]] = Coat of Arms of Queensland.svg |[[Parliament of South Australia]] = Adelaide parliament house.JPG |[[Parliament of Tasmania]] = Tasmania Coat of Arms.svg |[[Parliament of Victoria]] = Victoria Parliament House Melbourne.jpg |[[Parliament of Western Australia]] = Western Australian Coat of Arms.svg <!--BERMUDA--> |[[Parliament of Bermuda]] = Coat of arms of Bermuda.svg <!--CANADA--> |[[Parliament of Canada]] = Parliament-Ottawa.jpg |[[Legislative Assembly of Alberta]] = 2011 Alberta Legislature Building 03.jpg |[[Legislative Assembly of British Columbia]] = BC Legislature Buildings.jpg |[[Legislative Assembly of Manitoba]] = Parliamentwinnipeg manitoba.jpg |[[Legislative Assembly of New Brunswick]] = Legislative Assembly of New Brunswick.jpg |[[Newfoundland and Labrador House of Assembly]] = Colonialbuilding.jpg |[[Legislative Assembly of the Northwest Territories]] = Coat of arms of Northwest Territories.svg |[[Nova Scotia House of Assembly]] = Coat of arms of Nova Scotia.svg |[[Legislative Assembly of Nunavut]] = Leg Building Iqaluit 2000-08-27.jpg |[[Legislative Assembly of Ontario]] = Coat of Arms of Ontario.svg |[[Legislative Assembly of Prince Edward Island]] = 282 - Birthplace of Canada Charlottetown PEI.JPG |[[National Assembly of Quebec]] |[[National Assembly of Quebec|L'Assemblée Nationale du Québec]] = Armoiries du Québec.svg |[[Legislative Assembly of Saskatchewan]] = Sask Legislative Bldg.jpg |[[Yukon Legislative Assembly]] = Coat of arms of Yukon.svg <!--GIBRALTAR--> |[[Parliament of Gibraltar]] = Coat of arms of Gibraltar1.svg |[[Gibraltar Legislative Council]] = Coat of arms of Gibraltar1.svg <!--INDIA--> |[[Parliament of India]] = Emblem of India.svg <!--IRELAND--> |[[Oireachtas]] = Coat of arms of Ireland.svg <!--ISRAEL--> |[[Knesset]] = Israel Museum, Jerusalem P1110159 (5888320710).jpg <!--JAPAN--> |[[National Diet]] = Go-shichi no kiri crest 2.svg <!--KOREA--> |[[National Assembly of South Korea]] = National Assembly Building of the Republic of Korea.png <!--MALAYSIA--> |[[Parliament of Malaysia]] = Coat of arms of Malaysia.svg |[[Johor State Legislative Assembly]] = Sultan Ismail Building.JPG |[[Kedah State Legislative Assembly]] = Coat of arms of Kedah.svg |[[Kelantan State Legislative Assembly]] = Coat of arms of Kelantan.svg |[[Malacca State Legislative Assembly]] = Seri Negeri Blok Laksamana.JPG |[[Negeri Sembilan State Legislative Assembly]] = Coat of arms of Negeri Sembilan.svg |[[Pahang State Legislative Assembly]] = Coat of arms of Pahang.svg |[[Penang State Legislative Assembly]] = Dewan Undangan Negeri Penang Dec 2006 003.jpg |[[Perak State Legislative Assembly]] = Coat of arms of Perak.svg |[[Perlis State Legislative Assembly]] = Coat of arms of Perlis.svg |[[Sabah State Legislative Assembly]] = KotaKinabalu Sabah DewanUndanganNegeriSabah-01.jpg |[[Sarawak State Legislative Assembly]] = Sarawak state assembly building.jpg |[[Selangor State Legislative Assembly]] = Sultan Salahuddin Abdul Aziz Shah building.jpg |[[Terengganu State Legislative Assembly]] = Coat of arms of Terengganu.svg <!--NEW ZEALAND--> |[[New Zealand Parliament]] |[[Parliament of New Zealand]] = Coat of arms of New Zealand.svg <!--PHILIPPINES--> |[[National Assembly of the Philippines]] = Coat of arms of the Commonwealth of the Philippines.svg |[[Philippine Legislature]] = Coat of Arms Philippine Islands (1905–1936).svg |[[Commonwealth Congress]] = Coat of arms of the Commonwealth of the Philippines.svg |[[Batasang Pambansa]] = |[[Congress of the Philippines]] = Coat of Arms of the Philippines.svg |[[President of the Philippines]] = Seal of the President of the Philippines.svg <!--SINGAPORE--> |[[Parliament of Singapore]] = {{#ifexpr:{{gsd|day={{#time:j|{{{date|}}}}}|month={{#time:n|{{{date|}}}}}|year={{#time:Y|{{{date|}}}}} }}<730003|Old Parliament House 4, Singapore, Jan 06.JPG|Parliament House Singapore.jpg}} <!--SOUTH AFRICA--> |[[Parliament of South Africa]] = Coat of arms of South Africa (heraldic).svg |[[South African Parliament]] = Coat of arms of South Africa (heraldic).svg |[[Parliament of South Africa|Parliament&nbsp;of&nbsp;South&nbsp;Africa]] = Coat of arms of South Africa (heraldic).svg |[[Volksraad]] = Coat of Arms of the South African Republic.png |[[Eastern Cape Provincial Legislature]] = <!-- None --> |[[KwaZulu-Natal Legislature]] = KwaZulu-Natal Parliament building, Pietermaritzburg, South Africa.jpg |[[Western Cape Provincial Legislature]] |[[Western Cape Provincial Parliament]] = Western Cape provincial building.jpg <!--SOUTH AFRICA VARIANTS--> |[[Volksraad|Transvaal Volksraad]] = Coat of Arms of the South African Republic.png |[[Parliament of South Africa#1910|Parliament of South Africa]] = Coat of arms of South Africa (1910–1930).svg |[[Parliament of South Africa#1930|Parliament of South Africa]] = Coat of arms of South Africa (1930–1932).svg |[[Parliament of South Africa#1932|Parliament of South Africa]] = Coat of arms of South Africa (1932–2000).svg |[[Parliament of South Africa#1961|Parliament of South Africa]] = Coat of arms of South Africa (1932–2000).svg |[[Parliament of South Africa#1984|Parliament of South Africa]] = Coat of arms of South Africa (1932–2000).svg |[[Parliament of South Africa#1910|Parliament&nbsp;of&nbsp;South&nbsp;Africa]] = Coat of arms of South Africa (1910–1930).svg |[[Parliament of South Africa#1930|Parliament&nbsp;of&nbsp;South&nbsp;Africa]] = Coat of arms of South Africa (1930–1932).svg |[[Parliament of South Africa#1932|Parliament&nbsp;of&nbsp;South&nbsp;Africa]] = Coat of arms of South Africa (1932–2000).svg |[[Parliament of South Africa#1961|Parliament&nbsp;of&nbsp;South&nbsp;Africa]] = Coat of arms of South Africa (1932–2000).svg |[[Parliament of South Africa#1984|Parliament&nbsp;of&nbsp;South&nbsp;Africa]] = Coat of arms of South Africa (1932–2000).svg |[[South African Parliament#1910|South African Parliament]] = Coat of arms of South Africa (1910–1930).svg |[[South African Parliament#1930|South African Parliament]] = Coat of arms of South Africa (1930–1932).svg |[[South African Parliament#1932|South African Parliament]] = Coat of arms of South Africa (1932–2000).svg |[[South African Parliament#1961|South African Parliament]] = Coat of arms of South Africa (1932–2000).svg |[[South African Parliament#1984|South African Parliament]] = Coat of arms of South Africa (1932–2000).svg <!--STRAITS SETTLEMENTS--> |[[List of British Governors of the Straits Settlements|Governor of the Straits Settlements]] with the advice and consent of the [[Legislative Council of the Straits Settlements|Legislative Council]] = Coat of arms of the Straits Settlements.svg <!--UKRAINE--> |[[Verkhovna Rada]] = Будівля по вулиці Грушевського, 5.jpg <!--UNITED KINGDOM--> |[[Parliament of the United Kingdom]] = Royal Coat of Arms of the United Kingdom (HM Government).svg |[[Northern Ireland Assembly]] = Coat of Arms of Northern Ireland.svg |[[Parliament of Northern Ireland]] = Coat of Arms of Northern Ireland.svg |[[Scottish Parliament]] = Royal Coat of Arms of the United Kingdom (Scotland).svg |[[National Assembly for Wales]] = Royal Badge of Wales (2008).svg <!--USA--> |[[Government of the United States of America|Government of the United States of America]] = Great Seal of the United States (obverse).svg |[[United States Congress]] |[[Congress of the United States]] |[[Congress of the United States|US Congress]] |[[Congress of the United States|U.S. Congress]] = US Congressional Seal.svg |[[Alabama Legislature]] = Seal of Alabama.svg |[[Alaska Legislature]] = State Seal of Alaska.svg |[[Arizona Legislature]] = Arizonastateseal.jpg |[[Arkansas General Assembly]] = Seal of Arkansas.svg |[[California State Legislature]] = Seal of California.svg |[[Colorado General Assembly]] = Seal of Colorado.svg |[[Connecticut General Assembly]] = Connecticut State Capitol, Hartford.jpg |[[Michigan Legislature]] = Seal of Michigan.svg |[[Utah State Legislature]] = Seal of Utah.svg <!--DEFAULT--> |#default = <!-- None --> }}</includeonly><noinclude>{{Documentation}}</noinclude> 848212dfb5be22baf76aac5d4fe0e568b3404930 Template:Lua 10 20 36 35 2022-07-12T15:19:50Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:Lua banner|main}}</includeonly><noinclude> {{Lua|Module:Lua banner}} {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> dba3962144dacd289dbc34f50fbe0a7bf6d7f2f7 Template:Main other 10 21 38 37 2022-07-12T15:19:51Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:0}} | main | other }} }} | main = {{{1|}}} | other | #default = {{{2|}}} }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 86ad907ffeea3cc545159e00cd1f2d6433946450 Template:Mbox 10 22 40 39 2022-07-12T15:19:52Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#invoke:Message box|mbox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> c262e205f85f774a23f74119179ceea11751d68e Template:Mono 10 23 42 41 2022-07-12T15:19:53Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>ifsubst|1=|2=<templatestyles src="Mono/styles.css" />}}<span class="monospaced">{{{2|{{{1}}}}}}</span><noinclude> {{Documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 800f06823c02b03f8b9cf1e245ad8c4829cfe931 Template:Mono/styles.css 10 24 44 43 2022-07-12T15:19:53Z 17ademoladav 2 1 revision imported text text/plain /* {{pp-template}} */ .monospaced { /* "monospace, monospace" per [[WP:MONO]] */ font-family: monospace, monospace; } cadfc2ad2e42cde230abf3e74ad418f7c4c71ab4 Template:Para 10 25 46 45 2022-07-12T15:19:54Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <code class="nowrap" style="{{SAFESUBST:<noinclude />#if:{{{plain|}}}|border: none; background-color: inherit;}} {{SAFESUBST:<noinclude />#if:{{{plain|}}}{{{mxt|}}}{{{green|}}}{{{!mxt|}}}{{{red|}}}|color: {{SAFESUBST:<noinclude />#if:{{{mxt|}}}{{{green|}}}|#006400|{{SAFESUBST:<noinclude />#if:{{{!mxt|}}}{{{red|}}}|#8B0000|inherit}}}};}} {{SAFESUBST:<noinclude />#if:{{{style|}}}|{{{style}}}}}">&#124;{{SAFESUBST:<noinclude />#if:{{{1|}}}|{{{1}}}&#61;}}{{{2|}}}</code><noinclude> {{Documentation}} <!--Categories and interwikis go near the bottom of the /doc subpage.--> </noinclude> 96ef5dce1fb3a5c1b6648eac125a2496944a852e Template:Parameter names example 10 26 48 47 2022-07-12T15:19:54Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:Parameter names example|main}}</includeonly><noinclude> {{hatnote|[[Template:Generic template demo]] and [[Template:Pnex]] redirect here.}}<!--(hatnote more noticeable here than within Documentation)--> {{Documentation}} </noinclude> 6b63b13c0cf74f1f8d250aa644a6bd27e19052f6 Template:Remove first word 10 27 50 49 2022-07-12T15:19:55Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:String|replace|source={{{1}}}|pattern=^[^{{{sep|%s}}}]*{{{sep|%s}}}*|replace=|plain=false}}<noinclude>{{Documentation}}</noinclude> df7a9e692f68be1581be06af5f51eaed5483b4c8 Template:Sandbox other 10 28 52 51 2022-07-12T15:19:55Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#if:{{#ifeq:{{#invoke:String|sublength|s={{SUBPAGENAME}}|i=0|len=7}}|sandbox|1}}{{#ifeq:{{SUBPAGENAME}}|doc|1}}{{#invoke:String|match|{{PAGENAME}}|/sandbox/styles.css$|plain=false|nomatch=}}|{{{1|}}}|{{{2|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> 91e4ae891d6b791615152c1fbc971414961ba872 Template:Singapore legislation 10 29 54 53 2022-07-12T15:19:56Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#if:{{{title|}}} |{{#if:{{{titlelink|}}} |[[{{{titlelink}}}|{{#switch:{{{title}}} |Independence of Singapore Agreement = {{{title}}} 1965 |Republic of Singapore Independence Act = {{{title}}} 1965 |Territorial Waters Jurisdiction Act = {{{title}}} 1878 |Marine Conventions Act = {{{title}}} 1911 |Straits Settlements and Johore Territorial Waters (Agreement) Act = {{{title}}} 1928 |#default = {{{title}}}{{#ifeq:{{{sltype|}}} | S | &#32;{{{year}}} }} {{#if:{{{1|{{{cap|}}} }}}{{{sltype|}}} |{{#ifeq:{{{1|{{{cap|}}} }}} | new | &#32;{{{year}}} }} |{{#if:{{{year|}}} | &#32;{{{year}}} }} }} }}]]&#32;( |{{#switch:{{ucfirst:{{{title}}} }} |Constitution = [[Constitution of Singapore|{{#ifeq:{{lc:{{{abbr|}}}}}|on|Singapore Constitution|Constitution of the Republic of Singapore}}]] |Independence of Singapore Agreement = [[Independence of Singapore Agreement 1965]] |Republic of Singapore Independence Act = {{{title}}} 1965 |Territorial Waters Jurisdiction Act = {{{title}}} 1878 |Marine Conventions Act = {{{title}}} 1911 |Straits Settlements and Johore Territorial Waters (Agreement) Act = {{{title}}} 1928 |#default = {{{title}}}{{#ifeq:{{{sltype|}}} | S | &#32;{{{year}}} }} {{#if:{{{1|{{{cap|}}} }}}{{{sltype|}}} |{{#ifeq:{{{1|{{{cap|}}} }}} | new | &#32;{{{year}}} }} |{{#if:{{{year|}}} | &#32;{{{year}}} }} }} }}&#32;( }} }}{{#if:{{{sltype|}}} |{{#if:{{{archiveurl|}}} | [{{{archiveurl}}} | {{#if:{{{url|}}} | [{{{url}}} }} }} {{#switch:{{{sltype}}} |GN = {{#ifeq:{{lc:{{{abbr|}}} }} | off | Gazette Notification | G.N.}} No.&nbsp;{{{no}}}/{{{year}}} |S = S&nbsp;{{{no}}}/{{{year}}} |N |O |R |Rg = {{#if:{{{1|{{{cap|}}} }}}|Cap.&nbsp;{{{1|{{{cap}}}}}},&#32;}}{{{sltype}}}&nbsp;{{{no}}}, {{{2|{{{ed|{{{year}}}}}}}}} Rev. Ed. }}{{#if:{{{url|}}} | ] }} |{{#if:{{{no|}}} |{{#if:{{{url|}}} |[{{#if:{{{archiveurl|}}} | {{{archiverurl}}} | {{{url}}} }} No.&nbsp;{{{no}}} of {{{year}}}] |{{#ifeq:{{lc:{{{1|{{{cap}}} }}} }} | new | [{{Singapore legislation/index|cap={{{1|{{{cap}}} }}}|no={{{no}}}|year={{{year}}} }} No.&nbsp;{{{no}}} of {{{year}}}] |No.&nbsp;{{{no}}} of {{{year}}} }} }} |{{#if:{{{url|}}} |[{{#if:{{{archiveurl|}}} | {{{archiverurl}}} | {{{url}}} }} Cap.&nbsp;{{{1|{{{cap}}} }}}, {{{2|{{{ed}}}}}}&nbsp;Rev. Ed.] |{{#ifeq:{{lc:{{{lk}}} }} | off |{{#ifeq:{{{title|}}} | Constitution | {{{rep}}} Reprint | Cap.&nbsp;{{{1|{{{cap}}} }}}, {{{2|{{{ed}}}}}}&nbsp;Rev. Ed.}} |[{{Singapore legislation/index | cap = {{#switch:{{ucfirst:{{{title|}}} }} |Constitution = CONST |Independence of Singapore Agreement = INDEP |Republic of Singapore Independence Act = RSI |Territorial Waters Jurisdiction Act = IA1 |Straits Settlements and Johore Territorial Waters (Agreement) Act = IA2 |Marine Conventions Act = IA3 |#default = {{{1|{{{cap}}} }}} }} }} {{#switch:{{ucfirst:{{{title|}}} }} |Constitution = {{#if:{{{2|{{{ed|}}} }}} | {{{2|{{{ed}}}}}} Rev. Ed.,&#32;}}{{{rep}}} Reprint |Independence of Singapore Agreement = 1985 Rev. Ed. |Republic of Singapore Independence Act = No.&nbsp;9 of 1965 |Territorial Waters Jurisdiction Act = 41 & 42 Vict., c.&nbsp;73 |Straits Settlements and Johore Territorial Waters (Agreement) Act = 18 & 19 Geo. V, c.&nbsp;23 |Marine Conventions Act = 1 & 2 Geo. V, c.&nbsp;57 |#default = Cap.&nbsp;{{{1|{{{cap}}} }}} }}{{#if:{{{2|{{{ed|}}} }}} |{{#ifeq:{{{title}}} | Independence of Singapore Agreement |<!--Display nothing--> |{{#ifeq:{{{title}}} | Constitution | | ,&#32;{{{2|{{{ed}}}}}}&nbsp;Rev. Ed.}} }} }}] }} }} }} }}{{#if:{{{title|}}} | ) }}{{#if:{{{archiveurl|}}} | , archived from [{{{url}}} the original] on {{date | {{{archivedate}}} | {{{dateformat|}}} }} }}<noinclude><!--NOTE: Please place categories in [[Template:Singapore Statute/doc]].-->{{Documentation}}</noinclude> ae6d224f482ddb62e1b7d61ce0d7f9f667de1114 Template:Singapore legislation/index 10 30 56 55 2022-07-12T15:19:56Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly>https://sso.agc.gov.sg/{{#switch:{{{cap|}}} |1 = Act/IA1965 |1 of 2017 = Act/MA2017 |10 = Act/AA2001 |10 of 2018= Act/ESBA2018 |100 = Act/ESA1924 |102 = Act/ELA1968 |103 = Act/EA1968 |105 = Act/FSA1965 |106 = Act/FA1881 |107 = Act/FA1981 |108 = Act/FCA1967 |109 = Act/FPA1966 |109A = Act/FSA1993 |11 = Act/AIIDA1968 |11 of 2017= Act/SA2017 |11 of 2019= Act/SFAA2019 |110 = Act/FAA2001 |111 = Act/FA1966 |111A = Act/FLPA2012 |112 = Act/FRA1875 |113 = Act/FA1872 |114 = Act/FTZA1966 |115 = Act/FCA1959 |116A = Act/GA2001 |117 = Act/GCA1973 |117A = Act/GSTA1993 |117C = Act/GSTVFA2012 |118 = Act/GCA1966 |12 = Act/AA1991 |12 of 2016= Act/SA2016 |12 of 2017= Act/SSFY2016A2017 |12 of 2019= Act/SA2019 |120 = Act/GPA1997 |121 = Act/GPA1956 |121A = Act/GSA1992 |122 = Act/GIA1934 |122A = Act/HWCEITA1997 |122B = Act/HPBA2001 |122C = Act/HSAA2001 |122D = Act/HPA2007 |123 = Act/HCAJA1961 |124 = Act/HAPAIAA1978 |125 = Act/HPA1969 |126 = Act/HA1998 |126A = Act/HAA1988 |126B = Act/HAUSSA2001 |126C = Act/HTA2010 |127 = Act/HA1954 |128 = Act/HHSCA1947 |129 = Act/HDA1959 |13 = Act/AEA1913 |13 of 2016= Act/FSFY2015A2016 |13 of 2018= Act/SA2018 |13 of 2019= Act/SSFY2018A2019 |130 = Act/HDCLA1965 |131 = Act/HUDCHEA1984 |131A = Act/HOTA1987 |131B = Act/HCOPPA2004 |132 = Act/HCFA1947 |133 = Act/IA1959 |134 = Act/ITA1947 |135 = Act/IAA1941 |136 = Act/IRA1960 |137 = Act/IDA1976 |138 = Act/IFPA1966 |138A = Act/IRASA1992 |139 = Act/IA1921 |139A = Act/IA2007 |14 = Act/AOA1973 |14 of 2018= Act/SSFY2017A2018 |140 = Act/IPOSA2001 |141 = Act/ISEASYIIA1968 |141A = Act/ITEA1992 |142 = Act/IA1966 |143 = Act/ISA1960 |143A = Act/IAA1994 |143C = Act/ICAA2010 |144 = Act/IFCA1968 |144A = Act/IDAA2002 |144B = Act/IIAEA2009 |145 = Act/IOIPA1948 |145A = Act/IPPA2008 |146 = Act/ISA1967 |146A = Act/ISA1987 |147 = Act/JRA1994 |149 = Act/JPRRA1960 |15 = Act/ADBA1966 |150 = Act/JTCA1968 |151 = Act/KA1961 |152 = Act/LAA1966 |155 = Act/LRCA1940 |156 = Act/LSA1991 |157 = Act/LTA1993 |158 = Act/LTSA1967 |158A = Act/LTASA1995 |159A = Act/LDICA1999 |15A = Act/AIIBA2015 |16 = Act/AA1906 |160 = Act/LAAA1995 |161 = Act/LPA1966 |162 = Act/LA1934 |162A = Act/LLEFA2001 |163 = Act/LA1959 |163A = Act/LLPA2005 |163B = Act/LPA2008 |164 = Act/LIBA1958 |165 = Act/LFRFHA1953 |167 = Act/LTBA1923 |167A = Act/MRHA1990 |167B = Act/MPA1995 |169 = Act/MOREA1975 |16A = Act/AGAFA2014 |17 = Act/AA1966 |17 of 2015= Act/TPTBSPA2015 |170 = Act/MRVA1929 |170A = Act/MPASA1996 |170B = Act/MOA2003 |170C = Act/MODA2004 |173A = Act/MECESA2000 |174 = Act/MRA1997 |175 = Act/MTERA1972 |176 = Act/MA1975 |177 = Act/MASA1955 |177A = Act/MCA2008 |178A = Act/MHCTA2008 |179 = Act/MSA1995 |179A = Act/MSCLCBOPA2008 |18 = Act/BA1959 |18 of 2019= Act/POFMA2019 |180 = Act/MSCLCOPA1998 |181 = Act/MA1970 |182 = Act/MMA1963 |183 = Act/MFIA1959 |184 = Act/MOPONA1906 |185 = Act/MDA1973 |186 = Act/MASA1970 |187 = Act/MRBA1979 |188 = Act/MA2008 |189 = Act/MVTPRCA1960 |19 = Act/BA1970 |19 of 2014= Act/GIA2014 |19 of 2016= Act/AJPA2016 |19 of 2017= Act/ECDCA2017 |19 of 2018= Act/CJRA2018 |190 = Act/MLMPSPA1973 |190A = Act/MACMA2000 |191 = Act/MBOA1960 |191A = Act/NPA1992 |192A = Act/NTUCA2005 |193A = Act/NACA1991 |194 = Act/NCCA1972 |195 = Act/NEAA2002 |195A = Act/NCSSA1992 |196 = Act/NECDA1949 |196A = Act/NHBA1993 |197 = Act/NLBA1995 |198A = Act/NPBA1996 |199A = Act/NPFA2010 |2 = Act/AA2004 |2 of 2015 = Act/PA2015 |20 = Act/BA1995 |201 = Act/NRA1965 |201A = Act/NRFA2006 |201B = Act/NRDA2007 |202 = Act/NSEA1970 |204A = Act/NUSCA2005 |206 = Act/NPPA1974 |207 = Act/NAPA1967 |208 = Act/NPA1959 |209 = Act/NMA1999 |21 = Act/BA1960 |21 of 2012= Act/PPAA2012 |21 of 2016= Act/ECA2016 |21 of 2017= Act/TKWSFHTUDA2017 |211 = Act/ODA2000 |213 = Act/OSA1935 |213A = Act/OOA2007 |214 = Act/PPA1974 |215 = Act/PPSA1975 |216 = Act/PTA2005 |217 = Act/PPIPA1962 |218 = Act/PEA1954 |219 = Act/PPA1978 |22 = Act/BSDA1950 |22 of 2016= Act/IMDAA2016 |220 = Act/PA2007 |221 = Act/PA1994 |222A = Act/PSOA2006 |223 = Act/PTA1965 |224 = Act/PC1871 |224A = Act/PFA1995 |225 = Act/PA1956 |226 = Act/PEOA1976 |227 = Act/PAA1960 |228 = Act/PIEPA1941 |23 = Act/BEA1949 |23 of 2016= Act/GTAA2016 |23 of 2018= Act/CPA2018 |230 = Act/PRA2007 |231 = Act/PSSFNA2002 |232 = Act/PA1998 |232A = Act/PVPA2004 |234 = Act/PA1938 |235 = Act/PFA2004 |236 = Act/PDA2000 |237 = Act/POSBSTUDA1998 |237A = Act/PSA1999 |239 = Act/PMA2009 |24 = Act/BSA1886 |24 of 2014= Act/THPA2014 |24 of 2016= Act/SSAA2016 |240A = Act/PrEA1991 |241 = Act/PCA1960 |243 = Act/PPSA1990 |244 = Act/PCA1950 |247 = Act/PA1933 |247A = Act/PEA2009 |248 = Act/PHMCA1980 |24A = Act/BATA2005 |25 = Act/BSMA1998 |25 of 2017= Act/MSWRA2017 |250 = Act/PLA2011 |250A = Act/PSIA2007 |251 = Act/PAA1934 |252 = Act/POA1951 |253 = Act/PEA1991 |254 = Act/PTA1960 |256A = Act/PHA2014 |257 = Act/PEA1958 |257A = Act/POA2009 |259 = Act/PSCLSCA1956 |259A = Act/259A |259B = Act/PTCA1987 |26 = Act/BSAA1926 |26 of 2012= Act/PDPA2012 |26 of 2015= Act/OCA2015 |26 of 2018= Act/POSSPA2018 |260 = Act/PTA1915 |261 = Act/PUA2001 |262 = Act/RPA2007 |263 = Act/RA1905 |263A = Act/RTSA1995 |264 = Act/RECJA1921 |265 = Act/REFJA1959 |266 = Act/RDA2000 |267 = Act/RBDA1937 |268 = Act/RCA1949 |269 = Act/RDA1988 |27 = Act/BWAA1966 |27 of 2014= Act/FJA2014 |27 of 2017= Act/TSMRMA2017 |27 of 2018= Act/VAA2018 |270 = Act/RPA2002 |272A = Act/RIEA1995 |273 = Act/RRA1985 |274 = Act/RPA1976 |274A = Act/RRA1993 |275 = Act/RELA1983 |276 = Act/RTA1961 |277 = Act/RVSPA1960 |28 = Act/BA1994 |28 of 2015= Act/SSSA2015 |280 = Act/RIA1992 |281 = Act/SCPA1979 |282 = Act/SDA1914 |283 = Act/SFA1973 |283A = Act/SGUNCA1995 |284 = Act/SGQA1970 |284A = Act/SBIA1990 |285 = Act/SCPA1955 |286 = Act/ScCA1970 |288A = Act/SGDA2007 |289 = Act/SFA2001 |29 = Act/BCA1989 |29 of 2014= Act/BNRA2014 |29 of 2015= Act/HBRA2015 |290 = Act/SA1948 |291 = Act/SDCA1972 |292 = Act/SLA1963 |293 = Act/SEA1934 |294 = Act/SDA1999 |294A = Act/SALA1988 |294B = Act/SACA2013 |295 = Act/SAFA1972 |296 = Act/SAFNAA1959 |297A = Act/SBFA2001 |298 = Act/SCREA1975 |299A = Act/SEABA2003 |299B = Act/SITA2014 |2A = Act/ACRAA2004 |2B = Act/ASA2007 |3 = Act/AMLA1966 |3 of 2015 = Act/FEDA2015 |3 of 2017 = Act/AMA2017 |30 of 2015= Act/BSIA2015 |30 of 2017= Act/SUSSA2017 |300 = Act/SGCA2002 |301 = Act/SLAA2001 |302 = Act/SLFA1977 |302A = Act/SMUA2000 |303 = Act/SPA1954 |304 = Act/SRCSA1973 |305 = Act/SSCA1973 |305A = Act/STBA1987 |305B = Act/STBA1963 |305C = Act/STCCA1972 |305D = Act/WSAA2003 |305E = Act/SUTDA2011 |306 = Act/SDLA1979 |308 = Act/SCTA1984 |309 = Act/TCASA1993 |30A = Act/BCAA1999 |30B = Act/BCISPA2004 |30C = Act/BMSMA2004 |310 = Act/SPCPA1992 |311 = Act/SA1966 |311A = Act/SCA2007 |312 = Act/SDA1929 |313 = Act/SIA1979 |314 = Act/SLA1886 |315 = Act/SLEA1883 |316 = Act/SMCDCA1958 |317 = Act/SA1973 |317A = Act/SCARTA2013 |318 = Act/SBTSA1968 |319 = Act/SBGCPSA1983 |319A = Act/SCCCFA1989 |31A = Act/BTA2004 |32 of 2017= Act/HTCA2017 |320A = Act/SWA1995 |321 = Act/SCA1970 |322 = Act/SCJA1969 |323 = Act/TA1999 |323A = Act/TPA1990 |324 = Act/TPA1974 |324A = Act/TSBA2007 |325 = Act/TSFA2002 |327 = Act/TCA1971 |329A = Act/TCA1988 |32A = Act/CAA1988 |32B = Act/CAMC1999A2007 |33 = Act/CGSA1972 |331 = Act/TDA1941 |332 = Act/TMA1998 |333 = Act/TUA1940 |333A = Act/TCMPA2000 |334 = Act/TAA1975 |335 = Act/TDRA1960 |336 = Act/TCA2005 |337 = Act/TA1967 |338 = Act/UPA1967 |339 = Act/UNA2001 |339A = Act/UNPA2011 |33A = Act/CCA2006 |34 of 2014= Act/RGA2014 |34 of 2018= Act/IPBEA2018 |340 = Act/URAA1989 |341 = Act/VA1966 |342 = Act/VTA1903 |343 = Act/VCA1967 |344 = Act/VFA1960 |347 = Act/VSA1974 |349 = Act/WMA1975 |349A = Act/WMFA1999 |35 = Act/CA1973 |350 = Act/WOPA1904 |351 = Act/WABA1965 |352 = Act/WA1838 |353 = Act/WC1961 |354 = Act/WICA1975 |354A = Act/WSHA2006 |355 = Act/BSO1911 |356 = Act/BSGO1950 |357 = Act/CSGBA1981 |358 = Act/CBSVO1915 |359 = Act/DCCIIO1949 |36 = Act/CPFA1953 |360 = Act/DGMEAO1939 |361 = Act/FLCMIA1959 |362 = Act/FMDMO1954 |363 = Act/GSNO1958 |364 = Act/HEA1968 |365 = Act/JSO1878 |367 = Act/LSPO1957 |368 = Act/MELBO1908 |369 = Act/MEO1891 |37 = Act/CA1994 |370 = Act/NAKIO1933 |371 = Act/PMO1910 |372 = Act/PCO1876 |373 = Act/PCEMO1903 |374 = Act/RFO1948 |375 = Act/RCAA1975 |376 = Act/SAMHO1934 |377 = Act/SAO1939 |378 = Act/SMO1938 |379 = Act/SSDSO1959 |37B = Act/CWPA2000 |38 = Act/CYPA1993 |380 = Act/SRTO1918 |381 = Act/SSMIO1923 |382 = Act/SHO1904 |383 = Act/TPCSO1899 |384 = Act/BLA1992 |385 = Act/CBCA1960 |386 = Act/FA1889 |387 = Act/MIA1906 |388 = Act/MLAA1856 |389 = Act/MCA1987 |38A = Act/CDCSA2001 |39 = Act/CFA1971 |390 = Act/MA1967 |391 = Act/PA1890 |392 = Act/PAA1867 |393 = Act/SGA1979 |394 = Act/394 |395 = Act/TPRAIA1930 |396 = Act/UCTA1977 |39A = Act/CCAA2016 |4 = Act/ACA1939 |4 of 2015 = Act/MLSA2015 |40 = Act/CFHDA1966 |41 = Act/CAASA2009 |41 of 2017= Act/IPA2017 |42 = Act/CDA1986 |42A = Act/CDSA1997 |43 = Act/CLA1909 |43 of 2014= Act/PGMGFA2014 |44 = Act/CLGA1970 |45 = Act/CSCA2001 |45 of 2014= Act/PHTA2014 |45 of 2017= Act/MEA2017 |47A = Act/CISCODA2005 |48A = Act/CTA1992 |49 = Act/CGHA1961 |49A = Act/CMCA1997 |49B = Act/CCEFA2005 |4A = Act/AMDA1996 |5 of 2015 = Act/LCSCA2015 |5 of 2018 = Act/PSGA2018 |50 = Act/CoA1967 |50A = Act/CMA1993 |50B = Act/CA2004 |51 = Act/CEA2000 |52A = Act/CPFTA2003 |53 = Act/CPTDSRA1975 |53B = Act/CRTPA2001 |54 = Act/CNPIA1953 |55 = Act/CESA1973 |57 = Act/CMA1959 |57A = Act/CPA1993 |59 = Act/CVPA1998 |5A = Act/ASTRA1990 |6 = Act/ANA1966 |6 of 2014 = Act/MSMLCA2014 |6 of 2015 = Act/DSMA2015 |61 = Act/CLPA1886 |62 = Act/CSA1979 |63 = Act/CA1987 |63A = Act/CA2010 |65 = Act/CESOWA1958 |65A = Act/CDTOSCCBA1992 |65B = Act/CADDA1996 |67 = Act/CLTPA1955 |68 = Act/CPC2010 |69 = Act/CA1967 |6A = Act/ARSA2011 |6B = Act/AHPA2011 |7 = Act/ABA1965 |7 of 2015 = Act/CDRA2015 |7 of 2019 = Act/PSPMPMLTFA2019 |70 = Act/CA1960 |72 = Act/DFA1972 |73 = Act/DA1923 |74 = Act/DUA1922 |75 = Act/DA1957 |75A = Act/DSTAA2000 |76 = Act/DRA1999 |77 = Act/DTAA1950 |77B = Act/DIPOPSA2011 |78 = Act/DPA1989 |79 = Act/DIFA2000 |7A = Act/AELA1993 |8 = Act/AA1928 |80 = Act/DFA1959 |81 = Act/DLA1983 |81A = Act/DL1987A1987 |82 = Act/DCOOFA1968 |82A = Act/DCRA2005 |84 = Act/DA1934 |84A = Act/DCA2001 |85 = Act/EDBA1961 |86 = Act/EEIRITA1967 |87 = Act/EA1957 |87A = Act/EESSA1992 |87B = Act/ESIPA2001 |88 = Act/ETA2010 |89A = Act/EA2001 |9 = Act/ARA1909 |9 of 2018 = Act/CA2018 |90 = Act/EEPA1964 |91 = Act/EmA1968 |91A = Act/EFMA1990 |92 = Act/EAA1958 |92A = Act/ESIEA2006 |92B = Act/EMASA2001 |92C = Act/ECA2012 |93 = Act/EA1970 |94 = Act/EDA1950 |94A = Act/EPMA1999 |95 = Act/EPHA1987 |95A = Act/EAA2010 |96 = Act/EDA1929 |97 = Act/EA1893 |98 = Act/ECPOJA1979 |99 = Act/ECA1953 |99A = Act/ECHSA1996 |99B = Act/EDMA1999 |CONST = Act/CONS1963 |IA1 = Act/TWJA1878 |IA2 = Act/SSJTWAA1928 |IA3 = Act/MCA1911 |INDEP = Act/ISA1965 |RSI = Act/RSIA1965 |new = {{#switch:{{{year}}} |2001 = {{#switch:{{{no}}} |45 = Acts-Supp/45-2001 }} |2009 = {{#switch:{{{no}}} |15 = Acts-Supp/15-2009/Published/20120531?DocDate=20090723 }} |2010 = {{#switch:{{{no}}} |15 = Acts-Supp/15-2010/Published/20120831 }} }} |#default = }}</includeonly><noinclude>{{Documentation}}</noinclude> 33686a37543c82bd89755e0e72d87c9bd190b267 Template:Str left 10 31 58 57 2022-07-12T15:19:56Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly>{{safesubst:padleft:|{{{2|1}}}|{{{1}}}}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 2048b0d7b35e156528655b1d090e8b5ffab3f400 Template:TemplateData header 10 32 60 59 2022-07-12T15:19:57Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <div class="templatedata-header">{{#if:{{{noheader|}}}|<!-- noheader: -->{{Template parameter usage|based=y}}|<!-- +header: -->This is the {{#if:{{{nolink|}}}|<!-- +header, nolink TD -->TemplateData|<!-- +header, +link [[TD]]; DEFAULT: -->[[Wikipedia:TemplateData|TemplateData]]}}<!-- e.o. #if:nolink; DEFAULT: --> for this template used by [[mw:Extension:TemplateWizard|TemplateWizard]], [[Wikipedia:VisualEditor|VisualEditor]] and other tools. {{Template parameter usage|based=y}}<!-- e.o. #if:noheader -->}} '''TemplateData for {{{1|{{BASEPAGENAME}}}}}''' </div><includeonly><!-- check parameters -->{{#invoke:Check for unknown parameters|check |unknown={{template other|1=[[Category:Pages using TemplateData header with unknown parameters|_VALUE_]]}} |template=Template:TemplateData header |1 |nolink |noheader |preview=<div class="error" style="font-weight:normal">Unknown parameter '_VALUE_' in [[Template:TemplateData header]].</div> }}<!-- -->{{template other|{{sandbox other|| [[Category:Templates using TemplateData]] }}}}</includeonly><!-- --><noinclude>{{Documentation}}</noinclude> ddfbb4ae793846b96d4c06330417fa6ed4da2adc Template:Template link 10 33 62 61 2022-07-12T15:19:57Z 17ademoladav 2 1 revision imported wikitext text/x-wiki &#123;&#123;[[Template:{{{1}}}|{{{1}}}]]&#125;&#125;<noinclude>{{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> eabbec62efe3044a98ebb3ce9e7d4d43c222351d Template:Template other 10 34 64 63 2022-07-12T15:19:58Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Template}} | template | other }} }} | template = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 06fb13d264df967b5232141067eb7d2b67372d76 Template:Template parameter usage 10 35 66 65 2022-07-12T15:19:58Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#switch:{{{label|}}} |=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|C|c}}lick here] to see a monthly parameter usage report for {{#if:{{{1|}}}|[[Template:{{ROOTPAGENAME:{{{1|}}}}}]]|this template}}{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}}. |None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|P|p}}arameter usage report]{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}} |for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|P|p}}arameter usage report] for {{#if:{{{1|}}}|[[Template:{{ROOTPAGENAME:{{{1|}}}}}]]|[[Template:{{ROOTPAGENAME}}]]}}{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}}. |#default=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{{label|}}}]{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}} }}<noinclude> {{documentation}} </noinclude> b9cdd1b2e409313904f041c38562a3d6221cc017 Template:Tl 10 36 68 67 2022-07-12T15:19:59Z 17ademoladav 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Template link]] {{Redirect category shell| {{R from move}} }} d6593bb3b4a866249f55d0f34b047a71fe1f1529 Template:Var 10 37 70 69 2022-07-12T15:19:59Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <var {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} style="padding-right: 1px;{{{style|}}}" {{#if:{{{lang|}}}|lang="{{{lang}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1}}}</var><noinclude> <!--Categories and interwikis go near the bottom of the /doc page.--> {{Documentation}} </noinclude> 0e9e47694c01ca4c7b29566a1cb11a117dfbf2c0 Template:Yesno 10 38 72 71 2022-07-12T15:20:00Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }} |no |n |f |false |off |0 = {{{no|<!-- null -->}}} | = {{{blank|{{{no|<!-- null -->}}}}}} |¬ = {{{¬|}}} |yes |y |t |true |on |1 = {{{yes|yes}}} |#default = {{{def|{{{yes|yes}}}}}} }}<noinclude> {{Documentation}} </noinclude> 629c2937bc5cf7cfe13cd2a598582af832782399 Template:Yesno-no 10 39 74 73 2022-07-12T15:20:00Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{safesubst:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|no}}}|¬={{{¬|no}}}|def={{{def|no}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 1ad7b7800da1b867ead8f6ff8cef76e6201b3b56 Module:Arguments 828 40 76 75 2022-07-12T15:20:01Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Module:Check for unknown parameters 828 41 78 77 2022-07-12T15:20:01Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module may be used to compare the arguments passed to the parent -- with a list of arguments, returning a specified result if an argument is -- not on the list local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end local function clean(text) -- Return text cleaned for display and truncated if too long. -- Strip markers are replaced with dummy text representing the original wikitext. local pos, truncated local function truncate(text) if truncated then return '' end if mw.ustring.len(text) > 25 then truncated = true text = mw.ustring.sub(text, 1, 25) .. '...' end return mw.text.nowiki(text) end local parts = {} for before, tag, remainder in text:gmatch('([^\127]*)\127[^\127]*%-(%l+)%-[^\127]*\127()') do pos = remainder table.insert(parts, truncate(before) .. '&lt;' .. tag .. '&gt;...&lt;/' .. tag .. '&gt;') end table.insert(parts, truncate(text:sub(pos or 1))) return table.concat(parts) end function p._check(args, pargs) if type(args) ~= "table" or type(pargs) ~= "table" then -- TODO: error handling return end -- create the list of known args, regular expressions, and the return string local knownargs = {} local regexps = {} for k, v in pairs(args) do if type(k) == 'number' then v = trim(v) knownargs[v] = 1 elseif k:find('^regexp[1-9][0-9]*$') then table.insert(regexps, '^' .. v .. '$') end end -- loop over the parent args, and make sure they are on the list local ignoreblank = isnotempty(args['ignoreblank']) local showblankpos = isnotempty(args['showblankpositional']) local values = {} for k, v in pairs(pargs) do if type(k) == 'string' and knownargs[k] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(k, regexp) then knownflag = true break end end if not knownflag and ( not ignoreblank or isnotempty(v) ) then table.insert(values, clean(k)) end elseif type(k) == 'number' and knownargs[tostring(k)] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(tostring(k), regexp) then knownflag = true break end end if not knownflag and ( showblankpos or isnotempty(v) ) then table.insert(values, k .. ' = ' .. clean(v)) end end end -- add results to the output tables local res = {} if #values > 0 then local unknown_text = args['unknown'] or 'Found _VALUE_, ' if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then local preview_text = args['preview'] if isnotempty(preview_text) then preview_text = require('Module:If preview')._warning({preview_text}) elseif preview == nil then preview_text = unknown_text end unknown_text = preview_text end for _, v in pairs(values) do -- Fix odd bug for | = which gets stripped to the empty string and -- breaks category links if v == '' then v = ' ' end -- avoid error with v = 'example%2' ("invalid capture index") local r = unknown_text:gsub('_VALUE_', {_VALUE_ = v}) table.insert(res, r) end end return table.concat(res) end function p.check(frame) local args = frame.args local pargs = frame:getParent().args return p._check(args, pargs) end return p 93db6d115d4328d2a5148bb42959105e367b663e Module:Collapsible list 828 42 80 79 2022-07-12T15:20:02Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module implements {{collapsible list}}. local p = {} local function gettitlestyletracking( ts ) if not ts then return '' end ts = mw.ustring.gsub(mw.ustring.lower(ts), '%s', '') local tsvals = mw.text.split(ts, ';') table.sort(tsvals) local skey = table.concat(tsvals,';') skey = mw.ustring.gsub(skey, '^;', '') skey = mw.text.encode(mw.text.encode(skey),'%c%[%]=') if (mw.ustring.match(';' .. ts, ';background:') or mw.ustring.match(';' .. ts, ';background%-color:')) and mw.ustring.match(';' .. ts, ';text%-align:') then return '[[Category:Pages using collapsible list with both background and text-align in titlestyle|' .. skey .. ' ]]' end return '[[Category:Pages using collapsible list without both background and text-align in titlestyle|' .. skey .. ' ]]' end local function getListItem( data ) if not type( data ) == 'string' then return '' end return mw.ustring.format( '<li style="line-height: inherit; margin: 0">%s</li>', data ) end -- Returns an array containing the keys of all positional arguments -- that contain data (i.e. non-whitespace values). local function getArgNums( args ) local nums = {} for k, v in pairs( args ) do if type( k ) == 'number' and k >= 1 and math.floor( k ) == k and type( v ) == 'string' and mw.ustring.match( v, '%S' ) then table.insert( nums, k ) end end table.sort( nums ) return nums end -- Formats a list of classes, styles or other attributes. local function formatAttributes( attrType, ... ) local attributes = { ... } local nums = getArgNums( attributes ) local t = {} for i, num in ipairs( nums ) do table.insert( t, attributes[ num ] ) end if #t == 0 then return '' -- Return the blank string so concatenation will work. end return mw.ustring.format( ' %s="%s"', attrType, table.concat( t, ' ' ) ) end local function buildList( args ) -- Get the list items. local listItems = {} local argNums = getArgNums( args ) for i, num in ipairs( argNums ) do table.insert( listItems, getListItem( args[ num ] ) ) end if #listItems == 0 then return '' end listItems = table.concat( listItems ) -- hack around mw-collapsible show/hide jumpiness by looking for text-alignment -- by setting a margin if centered local textAlignmentCentered = 'text%-align%s*:%s*center' local centeredTitle = (args.title_style and args.title_style:lower():match(textAlignmentCentered) or args.titlestyle and args.titlestyle:lower():match(textAlignmentCentered)) local centeredTitleSpacing if centeredTitle then centeredTitleSpacing = 'margin: 0 4em' else centeredTitleSpacing = '' end -- Get class, style and title data. local collapsibleContainerClass = formatAttributes( 'class', 'mw-collapsible', not args.expand and 'mw-collapsed' ) local collapsibleContainerStyle = formatAttributes( 'style', 'text-align: center; font-size: 95%;', args.frame_style, args.framestyle ) local collapsibleTitleStyle = formatAttributes( 'style', 'line-height: 1.6em; font-weight: bold; font-size: 100%; text-align: left;', args.title_style, args.titlestyle ) local jumpyTitleStyle = formatAttributes( 'style', centeredTitleSpacing ) local title = args.title or 'List' local ulclass = formatAttributes( 'class', 'mw-collapsible-content', args.hlist and 'hlist' ) local ulstyle = formatAttributes( 'style', 'font-size: 105%; margin-top: 0; margin-bottom: 0; line-height: inherit; text-align: left;', not args.bullets and 'list-style: none none; margin-left: 0;', args.list_style, args.liststyle ) -- Build the list. return mw.ustring.format( '<div%s%s>\n<div%s><div%s>%s</div></div>\n<ul%s%s>%s</ul>\n</div>', collapsibleContainerClass, collapsibleContainerStyle, collapsibleTitleStyle, jumpyTitleStyle, title, ulclass, ulstyle, listItems ) .. gettitlestyletracking(args.title_style or args.titlestyle) end function p.main( frame ) local origArgs if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args for k, v in pairs( frame.args ) do origArgs = frame.args break end else origArgs = frame end local args = {} for k, v in pairs( origArgs ) do if type( k ) == 'number' or v ~= '' then args[ k ] = v end end return buildList( args ) end return p 84740cb2c6d397d94048903cb285933cab1b4f5d Module:Documentation 828 43 82 81 2022-07-12T15:20:02Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return '<span class="' .. message('toolbar-class') .. '">(' .. table.concat(ret, ' &#124; ') .. ')</span>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.fullUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[Image:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') else pagetype = message('sandbox-notice-pagetype-other') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(message('sandbox-category')) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end local data = {} data.title = title data.docTitle = docTitle -- View, display, edit, and purge links if /doc exists. data.viewLinkDisplay = message('view-link-display') data.editLinkDisplay = message('edit-link-display') data.historyLinkDisplay = message('history-link-display') data.purgeLinkDisplay = message('purge-link-display') -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end data.preload = preload data.createLinkDisplay = message('create-link-display') return data end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local function escapeBrackets(s) -- Escapes square brackets with HTML entities. s = s:gsub('%[', '&#91;') -- Replace square brackets with HTML entities. s = s:gsub('%]', '&#93;') return s end local ret local docTitle = data.docTitle local title = data.title local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay) local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay) ret = '[%s] [%s] [%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink) else local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) ret = '[%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, createLink, purgeLink) end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editUrl = docTitle:fullUrl{action = 'edit'} local editDisplay = message('edit-link-display') local editLink = makeUrlLink(editUrl, editDisplay) local historyUrl = docTitle:fullUrl{action = 'history'} local historyDisplay = message('history-link-display') local historyLink = makeUrlLink(historyUrl, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'} local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p 95ab9de543475e37250dc94558a5508a3c7c3dfc Module:Documentation/config 828 44 84 83 2022-07-12T15:20:03Z 17ademoladav 2 1 revision imported Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[File:Sandbox.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] -- A category to add to all template sandboxes. cfg['sandbox-category'] = 'Template sandboxes' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 71b68ed73088f1a59d61acf06bbee9fde6677f03 Module:Documentation/styles.css 828 45 86 85 2022-07-12T15:20:03Z 17ademoladav 2 1 revision imported text text/plain /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } ce0e629c92e3d825ab9fd927fe6cc37d9117b6cb Module:Effective protection expiry 828 46 88 87 2022-07-12T15:20:04Z 17ademoladav 2 1 revision imported Scribunto text/plain local p = {} -- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title) return stabilitySettings and stabilitySettings.expiry or 'unknown' elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 ) end local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename) if rawExpiry == 'infinity' then return 'infinity' elseif rawExpiry == '' then return 'unknown' else local year, month, day, hour, minute, second = rawExpiry:match( '^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$' ) if year then return string.format( '%s-%s-%sT%s:%s:%s', year, month, day, hour, minute, second ) else error('internal error in Module:Effective protection expiry; malformed expiry timestamp') end end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p 9a8c58dc2667232ed08a9b206a5d89ca8150312b Module:Effective protection level 828 47 90 89 2022-07-12T15:20:04Z 17ademoladav 2 1 revision imported Scribunto text/plain local p = {} -- Returns the permission required to perform a given action on a given title. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local level = mw.ext.FlaggedRevs.getStabilitySettings(title) level = level and level.autoreview if level == 'review' then return 'reviewer' elseif level ~= '' then return level else return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review end elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then error( 'First parameter must be one of edit, move, create, upload, undelete, autoreview', 2 ) end if title.namespace == 8 then -- MediaWiki namespace if title.text:sub(-3) == '.js' or title.text:sub(-4) == '.css' or title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page return 'interfaceadmin' else -- any non-JS/CSS MediaWiki page return 'sysop' end elseif title.namespace == 2 and title.isSubpage then if title.contentModel == 'javascript' or title.contentModel == 'css' then -- user JS or CSS page return 'interfaceadmin' elseif title.contentModel == 'json' then -- user JSON page return 'sysop' end end if action == 'undelete' then return 'sysop' end local level = title.protectionLevels[action] and title.protectionLevels[action][1] if level == 'sysop' or level == 'editprotected' then return 'sysop' elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page return 'sysop' elseif level == 'templateeditor' then return 'templateeditor' elseif action == 'move' then local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move. if blacklistentry and not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif title.namespace == 6 then return 'filemover' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end end local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename) if blacklistentry then if not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason return 'autoconfirmed' elseif level then return level elseif action == 'upload' then return 'autoconfirmed' elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts return 'user' else return '*' end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p 70256a489edf6be9808031b14a7e3ef3e025da97 Module:File link 828 48 92 91 2022-07-12T15:20:05Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module provides a library for formatting file wikilinks. local yesno = require('Module:Yesno') local checkType = require('libraryUtil').checkType local p = {} function p._main(args) checkType('_main', 1, args, 'table') -- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our -- own function to get the right error level. local function checkArg(key, val, level) if type(val) ~= 'string' then error(string.format( "type error in '%s' parameter of '_main' (expected string, got %s)", key, type(val) ), level) end end local ret = {} -- Adds a positional parameter to the buffer. local function addPositional(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = val end -- Adds a named parameter to the buffer. We assume that the parameter name -- is the same as the argument key. local function addNamed(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = key .. '=' .. val end -- Filename checkArg('file', args.file, 3) ret[#ret + 1] = 'File:' .. args.file -- Format if args.format then checkArg('format', args.format) if args.formatfile then checkArg('formatfile', args.formatfile) ret[#ret + 1] = args.format .. '=' .. args.formatfile else ret[#ret + 1] = args.format end end -- Border if yesno(args.border) then ret[#ret + 1] = 'border' end addPositional('location') addPositional('alignment') addPositional('size') addNamed('upright') addNamed('link') addNamed('alt') addNamed('page') addNamed('class') addNamed('lang') addNamed('start') addNamed('end') addNamed('thumbtime') addPositional('caption') return string.format('[[%s]]', table.concat(ret, '|')) end function p.main(frame) local origArgs = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:File link' }) if not origArgs.file then error("'file' parameter missing from [[Template:File link]]", 0) end -- Copy the arguments that were passed to a new table to avoid looking up -- every possible parameter in the frame object. local args = {} for k, v in pairs(origArgs) do -- Make _BLANK a special argument to add a blank parameter. For use in -- conditional templates etc. it is useful for blank arguments to be -- ignored, but we still need a way to specify them so that we can do -- things like [[File:Example.png|link=]]. if v == '_BLANK' then v = '' end args[k] = v end return p._main(args) end return p 66925f088d11530f2482f04181a3baaaa0ad3d0c Module:If empty 828 49 94 93 2022-07-12T15:20:05Z 17ademoladav 2 1 revision imported Scribunto text/plain local p = {} function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false}) local lastk = 0 for k,v in ipairs(args) do if v ~= '' then return v end lastk = k end end return p 4bfc0c7c8bf3b63144db1ea12f2260db00421233 Module:Infobox 828 50 96 95 2022-07-12T15:20:05Z 17ademoladav 2 1 revision imported Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub( category_in_empty_row_pattern, '' ):match('^%S') then has_rows = true local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true root :tag('tr') :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true local row = root:tag('tr') row:addClass(imageArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(mw.getCurrentFrame():expandTemplate({title = 'italic title'})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if args.decat == 'yes' then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ base_templatestyles, -- see function description templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p 05a758c4532f643205b2300a5935f5d4ef3fc721 Module:Infobox/styles.css 828 51 98 97 2022-07-12T15:20:06Z 17ademoladav 2 1 revision imported text text/plain /* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; } .infobox-3cols-child { margin: auto; } .infobox .navbar { font-size: 100%; } /* T281642 */ body.skin-minerva .infobox-header, body.skin-minerva .infobox-subheader, body.skin-minerva .infobox-above, body.skin-minerva .infobox-title, body.skin-minerva .infobox-image, body.skin-minerva .infobox-full-data, body.skin-minerva .infobox-below { text-align: center; } e8de6d96f4fde53afc4a6b0fed534405ab59b0a7 Module:InfoboxImage 828 52 100 99 2022-07-12T15:20:06Z 17ademoladav 2 1 revision imported Scribunto text/plain -- Inputs: -- image - Can either be a bare filename (with or without the File:/Image: prefix) or a fully formatted image link -- page - page to display for multipage images (DjVu) -- size - size to display the image -- maxsize - maximum size for image -- sizedefault - default size to display the image if size param is blank -- alt - alt text for image -- title - title text for image -- border - set to yes if border -- center - set to yes, if the image has to be centered -- upright - upright image param -- suppressplaceholder - if yes then checks to see if image is a placeholder and suppresses it -- link - page to visit when clicking on image -- class - HTML classes to add to the image -- Outputs: -- Formatted image. -- More details available at the "Module:InfoboxImage/doc" page local i = {}; local placeholder_image = { "Blue - Replace this image female.svg", "Blue - Replace this image male.svg", "Female no free image yet.png", "Flag of None (square).svg", "Flag of None.svg", "Flag of.svg", "Green - Replace this image female.svg", "Green - Replace this image male.svg", "Image is needed female.svg", "Image is needed male.svg", "Location map of None.svg", "Male no free image yet.png", "Missing flag.png", "No flag.svg", "No free portrait.svg", "No portrait (female).svg", "No portrait (male).svg", "Red - Replace this image female.svg", "Red - Replace this image male.svg", "Replace this image female (blue).svg", "Replace this image female.svg", "Replace this image male (blue).svg", "Replace this image male.svg", "Silver - Replace this image female.svg", "Silver - Replace this image male.svg", "Replace this image.svg", "Cricket no pic.png", "CarersLogo.gif", "Diagram Needed.svg", "Example.jpg", "Image placeholder.png", "No male portrait.svg", "Nocover-upload.png", "NoDVDcover copy.png", "Noribbon.svg", "No portrait-BFD-test.svg", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Sin bandera.svg", "Sin escudo.svg", "Replace this image - temple.png", "Replace this image butterfly.png", "Replace this image.svg", "Replace this image1.svg", "Resolution angle.png", "Image-No portrait-text-BFD-test.svg", "Insert image here.svg", "No image available.png", "NO IMAGE YET square.png", "NO IMAGE YET.png", "No Photo Available.svg", "No Screenshot.svg", "No-image-available.jpg", "Null.png", "PictureNeeded.gif", "Place holder.jpg", "Unbenannt.JPG", "UploadACopyrightFreeImage.svg", "UploadAnImage.gif", "UploadAnImage.svg", "UploadAnImageShort.svg", "CarersLogo.gif", "Diagram Needed.svg", "No male portrait.svg", "NoDVDcover copy.png", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Noimage.gif", } function i.IsPlaceholder(image) -- change underscores to spaces image = mw.ustring.gsub(image, "_", " "); assert(image ~= nil, 'mw.ustring.gsub(image, "_", " ") must not return nil') -- if image starts with [[ then remove that and anything after | if mw.ustring.sub(image,1,2) == "[[" then image = mw.ustring.sub(image,3); image = mw.ustring.gsub(image, "([^|]*)|.*", "%1"); assert(image ~= nil, 'mw.ustring.gsub(image, "([^|]*)|.*", "%1") must not return nil') end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); assert(image ~= nil, "mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1') must not return nil") -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); -- capitalise first letter image = mw.ustring.upper(mw.ustring.sub(image,1,1)) .. mw.ustring.sub(image,2); for i,j in pairs(placeholder_image) do if image == j then return true end end return false end function i.InfoboxImage(frame) local image = frame.args["image"]; if image == "" or image == nil then return ""; end if image == "&nbsp;" then return image; end if frame.args["suppressplaceholder"] ~= "no" then if i.IsPlaceholder(image) == true then return ""; end end if mw.ustring.lower(mw.ustring.sub(image,1,5)) == "http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "[http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[[http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "https:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[https:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,8)) == "[[https:" then return ""; end if mw.ustring.sub(image,1,2) == "[[" then -- search for thumbnail images and add to tracking cat if found local cat = ""; if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, "|%s*thumb%s*[|%]]") or mw.ustring.find(image, "|%s*thumbnail%s*[|%]]")) then cat = "[[Category:Pages using infoboxes with thumbnail images]]"; end return image .. cat; elseif mw.ustring.sub(image,1,2) == "{{" and mw.ustring.sub(image,1,3) ~= "{{{" then return image; elseif mw.ustring.sub(image,1,1) == "<" then return image; elseif mw.ustring.sub(image,1,5) == mw.ustring.char(127).."UNIQ" then -- Found strip marker at begining, so pass don't process at all return image; elseif mw.ustring.sub(image,4,9) == "`UNIQ-" then -- Found strip marker at begining, so pass don't process at all return image; else local result = ""; local page = frame.args["page"]; local size = frame.args["size"]; local maxsize = frame.args["maxsize"]; local sizedefault = frame.args["sizedefault"]; local alt = frame.args["alt"]; local link = frame.args["link"]; local title = frame.args["title"]; local border = frame.args["border"]; local upright = frame.args["upright"] or ""; local thumbtime = frame.args["thumbtime"] or ""; local center = frame.args["center"]; local class = frame.args["class"]; -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end if maxsize ~= "" and maxsize ~= nil then -- if no sizedefault then set to maxsize if sizedefault == "" or sizedefault == nil then sizedefault = maxsize end -- check to see if size bigger than maxsize if size ~= "" and size ~= nil then local sizenumber = tonumber(mw.ustring.match(size,"%d*")) or 0; local maxsizenumber = tonumber(mw.ustring.match(maxsize,"%d*")) or 0; if sizenumber>maxsizenumber and maxsizenumber>0 then size = maxsize; end end end -- add px to size if just a number if (tonumber(size) or 0) > 0 then size = size .. "px"; end -- add px to sizedefault if just a number if (tonumber(sizedefault) or 0) > 0 then sizedefault = sizedefault .. "px"; end result = "[[File:" .. image; if page ~= "" and page ~= nil then result = result .. "|page=" .. page; end if size ~= "" and size ~= nil then result = result .. "|" .. size; elseif sizedefault ~= "" and sizedefault ~= nil then result = result .. "|" .. sizedefault; else result = result .. "|frameless"; end if center == "yes" then result = result .. "|center" end if alt ~= "" and alt ~= nil then result = result .. "|alt=" .. alt; end if link ~= "" and link ~= nil then result = result .. "|link=" .. link; end if border == "yes" then result = result .. "|border"; end if upright == "yes" then result = result .. "|upright"; elseif upright ~= "" then result = result .. "|upright=" .. upright; end if thumbtime ~= "" then result = result .. "|thumbtime=" .. thumbtime; end if class ~= nil and class ~= "" then result = result .. "|class=" .. class; end -- if alt value is a keyword then do not use as a description if alt == "thumbnail" or alt == "thumb" or alt == "frameless" or alt == "left" or alt == "center" or alt == "right" or alt == "upright" or alt == "border" or mw.ustring.match(alt or "", '^[0-9]*px$', 1) ~= nil then alt = nil; end if title ~= "" and title ~= nil then -- does title param contain any templatestyles? If yes then set to blank. if mw.ustring.match(frame:preprocess(title), 'UNIQ%-%-templatestyles', 1) ~= nil then title = nil; end end if title ~= "" and title ~= nil then result = result .. "|" .. title; end result = result .. "]]"; return result; end end return i; 0ee5fe75ba239fc5c9cedc81ca11bdc0be068542 Module:List 828 53 102 101 2022-07-12T15:20:07Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module outputs different kinds of lists. At the moment, bulleted, -- unbulleted, horizontal, ordered, and horizontal ordered lists are supported. local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes data.classes = {} if listType == 'horizontal' or listType == 'horizontal_ordered' then table.insert(data.classes, 'hlist hlist-separated') elseif listType == 'unbulleted' then table.insert(data.classes, 'plainlist') end table.insert(data.classes, args.class) -- Main div style data.style = args.style -- Indent for horizontal lists if listType == 'horizontal' or listType == 'horizontal_ordered' then local indent = tonumber(args.indent) indent = indent and indent * 1.6 or 0 if indent > 0 then data.marginLeft = indent .. 'em' end end -- List style types for ordered lists -- This could be "1, 2, 3", "a, b, c", or a number of others. The list style -- type is either set by the "type" attribute or the "list-style-type" CSS -- property. if listType == 'ordered' or listType == 'horizontal_ordered' then data.listStyleType = args.list_style_type or args['list-style-type'] data.type = args['type'] -- Detect invalid type attributes and attempt to convert them to -- list-style-type CSS properties. if data.type and not data.listStyleType and not tostring(data.type):find('^%s*[1AaIi]%s*$') then data.listStyleType = data.type data.type = nil end end -- List tag type if listType == 'ordered' or listType == 'horizontal_ordered' then data.listTag = 'ol' else data.listTag = 'ul' end -- Start number for ordered lists data.start = args.start if listType == 'horizontal_ordered' then -- Apply fix to get start numbers working with horizontal ordered lists. local startNum = tonumber(data.start) if startNum then data.counterReset = 'listitem ' .. tostring(startNum - 1) end end -- List style -- ul_style and ol_style are included for backwards compatibility. No -- distinction is made for ordered or unordered lists. data.listStyle = args.list_style -- List items -- li_style is included for backwards compatibility. item_style was included -- to be easier to understand for non-coders. data.itemStyle = args.item_style or args.li_style data.items = {} for i, num in ipairs(mTableTools.numKeys(args)) do local item = {} item.content = args[num] item.style = args['item' .. tostring(num) .. '_style'] or args['item_style' .. tostring(num)] item.value = args['item' .. tostring(num) .. '_value'] or args['item_value' .. tostring(num)] table.insert(data.items, item) end return data end function p.renderList(data) -- Renders the list HTML. -- Return the blank string if there are no list items. if type(data.items) ~= 'table' or #data.items < 1 then return '' end -- Render the main div tag. local root = mw.html.create('div') for i, class in ipairs(data.classes or {}) do root:addClass(class) end root:css{['margin-left'] = data.marginLeft} if data.style then root:cssText(data.style) end -- Render the list tag. local list = root:tag(data.listTag or 'ul') list :attr{start = data.start, type = data.type} :css{ ['counter-reset'] = data.counterReset, ['list-style-type'] = data.listStyleType } if data.listStyle then list:cssText(data.listStyle) end -- Render the list items for i, t in ipairs(data.items or {}) do local item = list:tag('li') if data.itemStyle then item:cssText(data.itemStyle) end if t.style then item:cssText(t.style) end item :attr{value = t.value} :wikitext(t.content) end return tostring(root) end function p.renderTrackingCategories(args) local isDeprecated = false -- Tracks deprecated parameters. for k, v in pairs(args) do k = tostring(k) if k:find('^item_style%d+$') or k:find('^item_value%d+$') then isDeprecated = true break end end local ret = '' if isDeprecated then ret = ret .. '[[Category:List templates with deprecated parameters]]' end return ret end function p.makeList(listType, args) if not listType or not listTypes[listType] then error(string.format( "bad argument #1 to 'makeList' ('%s' is not a valid list type)", tostring(listType) ), 2) end checkType('makeList', 2, args, 'table') local data = p.makeListData(listType, args) local list = p.renderList(data) local trackingCategories = p.renderTrackingCategories(args) return list .. trackingCategories end for listType in pairs(listTypes) do p[listType] = function (frame) local mArguments = require('Module:Arguments') local origArgs = mArguments.getArgs(frame, { valueFunc = function (key, value) if not value or not mw.ustring.find(value, '%S') then return nil end if mw.ustring.find(value, '^%s*[%*#;:]') then return value else return value:match('^%s*(.-)%s*$') end return nil end }) -- Copy all the arguments to a new table, for faster indexing. local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.makeList(listType, args) end end return p 0d6c114450d0f5b3c1d2171ebeb41ae74f203f88 Module:Lua banner 828 54 104 103 2022-07-12T15:20:07Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module implements the {{lua}} template. local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local p = {} function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end function p._main(args) local modules = mTableTools.compressSparseArray(args) local box = p.renderBox(modules) local trackingCategories = p.renderTrackingCategories(args, modules) return box .. trackingCategories end function p.renderBox(modules) local boxArgs = {} if #modules < 1 then boxArgs.text = '<strong class="error">Error: no modules specified</strong>' else local moduleLinks = {} for i, module in ipairs(modules) do moduleLinks[i] = string.format('[[:%s]]', module) local maybeSandbox = mw.title.new(module .. '/sandbox') if maybeSandbox.exists then moduleLinks[i] = moduleLinks[i] .. string.format(' ([[:%s|sandbox]])', maybeSandbox.fullText) end end local moduleList = mList.makeList('bulleted', moduleLinks) local title = mw.title.getCurrentTitle() if title.subpageText == "doc" then title = title.basePageTitle end if title.contentModel == "Scribunto" then boxArgs.text = 'This module depends on the following other modules:' .. moduleList else boxArgs.text = 'This template uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList end end boxArgs.type = 'notice' boxArgs.small = true boxArgs.image = '[[File:Lua-Logo.svg|30px|alt=|link=]]' return mMessageBox.main('mbox', boxArgs) end function p.renderTrackingCategories(args, modules, titleObj) if yesno(args.nocat) then return '' end local cats = {} -- Error category if #modules < 1 then cats[#cats + 1] = 'Lua templates with errors' end -- Lua templates category titleObj = titleObj or mw.title.getCurrentTitle() local subpageBlacklist = { doc = true, sandbox = true, sandbox2 = true, testcases = true } if not subpageBlacklist[titleObj.subpageText] then local protCatName if titleObj.namespace == 10 then local category = args.category if not category then local categories = { ['Module:String'] = 'Templates based on the String Lua module', ['Module:Math'] = 'Templates based on the Math Lua module', ['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module', ['Module:Citation'] = 'Templates based on the Citation/CS1 Lua module' } categories['Module:Citation/CS1'] = categories['Module:Citation'] category = modules[1] and categories[modules[1]] category = category or 'Lua-based templates' end cats[#cats + 1] = category protCatName = "Templates using under-protected Lua modules" elseif titleObj.namespace == 828 then protCatName = "Modules depending on under-protected modules" end if not args.noprotcat and protCatName then local protLevels = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } local currentProt if titleObj.id ~= 0 then -- id is 0 (page does not exist) if am previewing before creating a template. currentProt = titleObj.protectionLevels["edit"][1] end if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end for i, module in ipairs(modules) do if module ~= "WP:libraryUtil" then local moduleProt = mw.title.new(module).protectionLevels["edit"][1] if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end if moduleProt < currentProt then cats[#cats + 1] = protCatName break end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end return p 6e3bedcc849ff22d4f702708965c39b97d7e8585 Module:Message box 828 55 106 105 2022-07-12T15:20:08Z 17ademoladav 2 1 revision imported Scribunto text/plain require('Module:No globals') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage or 'Imbox notice.png', imageSize) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) fd6a8b1a0ac5916465cdf2eb099825f1d006cfba Module:Message box/configuration 828 56 108 107 2022-07-12T15:20:08Z 17ademoladav 2 1 revision imported Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '<small>[[Help:Maintenance template removal|Learn how and when to remove this template message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css' }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false, templatestyles = 'Module:Message box/fmbox.css' }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox license.png' -- @todo We need an SVG version of this }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg' }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css' }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } b6f0151037e6867b577c8cca32ff297e48697a10 Module:No globals 828 57 110 109 2022-07-12T15:20:09Z 17ademoladav 2 1 revision imported Scribunto text/plain local mt = getmetatable(_G) or {} function mt.__index (t, k) if k ~= 'arg' then error('Tried to read nil global ' .. tostring(k), 2) end return nil end function mt.__newindex(t, k, v) if k ~= 'arg' then error('Tried to write global ' .. tostring(k), 2) end rawset(t, k, v) end setmetatable(_G, mt) 8ce3969f7d53b08bd00dabe4cc9780bc6afd412a Module:Parameter names example 828 58 112 111 2022-07-12T15:20:09Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module implements {{parameter names example}}. local p = {} local function makeParam(s) local lb = '&#123;' local rb = '&#125;' return lb:rep(3) .. s .. rb:rep(3) end local function italicize(s) return "''" .. s .. "''" end local function plain(s) return s end function p._main(args, frame) -- Find how we want to format the arguments to the template. local formatFunc if args._display == 'italics' or args._display == 'italic' then formatFunc = italicize elseif args._display == 'plain' then formatFunc = plain else formatFunc = makeParam end -- Build the table of template arguments. local targs = {} for k, v in pairs(args) do if type(k) == 'number' then targs[v] = formatFunc(v) elseif not k:find('^_') then targs[k] = v end end targs['nocat'] = 'yes'; targs['categories'] = 'no'; targs['demo'] = 'yes'; -- Find the template name. local template if args._template then template = args._template else local currentTitle = mw.title.getCurrentTitle() if currentTitle.prefixedText:find('/sandbox$') then template = currentTitle.prefixedText else template = currentTitle.basePageTitle.prefixedText end end -- Call the template with the arguments. frame = frame or mw.getCurrentFrame() local success, result = pcall( frame.expandTemplate, frame, {title = template, args = targs} ) if success then return result else return '' end end function p.main(frame) local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Parameter names example' }) return p._main(args, frame) end return p 576eb8298850f4e4e62105ac740df295b7b7eb9e Module:Protection banner 828 59 114 113 2022-07-12T15:20:10Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module implements {{pp-meta}} and its daughter templates such as -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. -- Initialise necessary modules. require('Module:No globals') local makeFileLink = require('Module:File link')._main local effectiveProtectionLevel = require('Module:Effective protection level')._main local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main local yesno = require('Module:Yesno') -- Lazily initialise modules and objects we don't always need. local getArgs, makeMessageBox, lang -- Set constants. local CONFIG_MODULE = 'Module:Protection banner/config' -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function makeCategoryLink(cat, sort) if cat then return string.format( '[[%s:%s|%s]]', mw.site.namespaces[14].name, cat, sort ) end end -- Validation function for the expiry and the protection date local function validateDate(dateString, dateType) if not lang then lang = mw.language.getContentLanguage() end local success, result = pcall(lang.formatDate, lang, 'U', dateString) if success then result = tonumber(result) if result then return result end end error(string.format( 'invalid %s: %s', dateType, tostring(dateString) ), 4) end local function makeFullUrl(page, query, display) return string.format( '[%s %s]', tostring(mw.uri.fullUrl(page, query)), display ) end -- Given a directed graph formatted as node -> table of direct successors, -- get a table of all nodes reachable from a given node (though always -- including the given node). local function getReachableNodes(graph, start) local toWalk, retval = {[start] = true}, {} while true do -- Can't use pairs() since we're adding and removing things as we're iterating local k = next(toWalk) -- This always gets the "first" key if k == nil then return retval end toWalk[k] = nil retval[k] = true for _,v in ipairs(graph[k]) do if not retval[v] then toWalk[v] = true end end end end -------------------------------------------------------------------------------- -- Protection class -------------------------------------------------------------------------------- local Protection = {} Protection.__index = Protection Protection.supportedActions = { edit = true, move = true, autoreview = true, upload = true } Protection.bannerConfigFields = { 'text', 'explanation', 'tooltip', 'alt', 'link', 'image' } function Protection.new(args, cfg, title) local obj = {} obj._cfg = cfg obj.title = title or mw.title.getCurrentTitle() -- Set action if not args.action then obj.action = 'edit' elseif Protection.supportedActions[args.action] then obj.action = args.action else error(string.format( 'invalid action: %s', tostring(args.action) ), 3) end -- Set level obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title) if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then -- Users need to be autoconfirmed to move pages anyway, so treat -- semi-move-protected pages as unprotected. obj.level = '*' end -- Set expiry local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title) if effectiveExpiry == 'infinity' then obj.expiry = 'indef' elseif effectiveExpiry ~= 'unknown' then obj.expiry = validateDate(effectiveExpiry, 'expiry date') end -- Set reason if args[1] then obj.reason = mw.ustring.lower(args[1]) if obj.reason:find('|') then error('reasons cannot contain the pipe character ("|")', 3) end end -- Set protection date if args.date then obj.protectionDate = validateDate(args.date, 'protection date') end -- Set banner config do obj.bannerConfig = {} local configTables = {} if cfg.banners[obj.action] then configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason] end if cfg.defaultBanners[obj.action] then configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level] configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default end configTables[#configTables + 1] = cfg.masterBanner for i, field in ipairs(Protection.bannerConfigFields) do for j, t in ipairs(configTables) do if t[field] then obj.bannerConfig[field] = t[field] break end end end end return setmetatable(obj, Protection) end function Protection:isUserScript() -- Whether the page is a user JavaScript or CSS page. local title = self.title return title.namespace == 2 and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) end function Protection:isProtected() return self.level ~= '*' end function Protection:shouldShowLock() -- Whether we should output a banner/padlock return self:isProtected() and not self:isUserScript() end -- Whether this page needs a protection category. Protection.shouldHaveProtectionCategory = Protection.shouldShowLock function Protection:isTemporary() return type(self.expiry) == 'number' end function Protection:makeProtectionCategory() if not self:shouldHaveProtectionCategory() then return '' end local cfg = self._cfg local title = self.title -- Get the expiry key fragment. local expiryFragment if self.expiry == 'indef' then expiryFragment = self.expiry elseif type(self.expiry) == 'number' then expiryFragment = 'temp' end -- Get the namespace key fragment. local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace] if not namespaceFragment and title.namespace % 2 == 1 then namespaceFragment = 'talk' end -- Define the order that key fragments are tested in. This is done with an -- array of tables containing the value to be tested, along with its -- position in the cfg.protectionCategories table. local order = { {val = expiryFragment, keypos = 1}, {val = namespaceFragment, keypos = 2}, {val = self.reason, keypos = 3}, {val = self.level, keypos = 4}, {val = self.action, keypos = 5} } --[[ -- The old protection templates used an ad-hoc protection category system, -- with some templates prioritising namespaces in their categories, and -- others prioritising the protection reason. To emulate this in this module -- we use the config table cfg.reasonsWithNamespacePriority to set the -- reasons for which namespaces have priority over protection reason. -- If we are dealing with one of those reasons, move the namespace table to -- the end of the order table, i.e. give it highest priority. If not, the -- reason should have highest priority, so move that to the end of the table -- instead. --]] table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3)) --[[ -- Define the attempt order. Inactive subtables (subtables with nil "value" -- fields) are moved to the end, where they will later be given the key -- "all". This is to cut down on the number of table lookups in -- cfg.protectionCategories, which grows exponentially with the number of -- non-nil keys. We keep track of the number of active subtables with the -- noActive parameter. --]] local noActive, attemptOrder do local active, inactive = {}, {} for i, t in ipairs(order) do if t.val then active[#active + 1] = t else inactive[#inactive + 1] = t end end noActive = #active attemptOrder = active for i, t in ipairs(inactive) do attemptOrder[#attemptOrder + 1] = t end end --[[ -- Check increasingly generic key combinations until we find a match. If a -- specific category exists for the combination of key fragments we are -- given, that match will be found first. If not, we keep trying different -- key fragment combinations until we match using the key -- "all-all-all-all-all". -- -- To generate the keys, we index the key subtables using a binary matrix -- with indexes i and j. j is only calculated up to the number of active -- subtables. For example, if there were three active subtables, the matrix -- would look like this, with 0 corresponding to the key fragment "all", and -- 1 corresponding to other key fragments. -- -- j 1 2 3 -- i -- 1 1 1 1 -- 2 0 1 1 -- 3 1 0 1 -- 4 0 0 1 -- 5 1 1 0 -- 6 0 1 0 -- 7 1 0 0 -- 8 0 0 0 -- -- Values of j higher than the number of active subtables are set -- to the string "all". -- -- A key for cfg.protectionCategories is constructed for each value of i. -- The position of the value in the key is determined by the keypos field in -- each subtable. --]] local cats = cfg.protectionCategories for i = 1, 2^noActive do local key = {} for j, t in ipairs(attemptOrder) do if j > noActive then key[t.keypos] = 'all' else local quotient = i / 2 ^ (j - 1) quotient = math.ceil(quotient) if quotient % 2 == 1 then key[t.keypos] = t.val else key[t.keypos] = 'all' end end end key = table.concat(key, '|') local attempt = cats[key] if attempt then return makeCategoryLink(attempt, title.text) end end return '' end function Protection:isIncorrect() local expiry = self.expiry return not self:shouldHaveProtectionCategory() or type(expiry) == 'number' and expiry < os.time() end function Protection:isTemplateProtectedNonTemplate() local action, namespace = self.action, self.title.namespace return self.level == 'templateeditor' and ( (action ~= 'edit' and action ~= 'move') or (namespace ~= 10 and namespace ~= 828) ) end function Protection:makeCategoryLinks() local msg = self._cfg.msg local ret = {self:makeProtectionCategory()} if self:isIncorrect() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-incorrect'], self.title.text ) end if self:isTemplateProtectedNonTemplate() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-template'], self.title.text ) end return table.concat(ret) end -------------------------------------------------------------------------------- -- Blurb class -------------------------------------------------------------------------------- local Blurb = {} Blurb.__index = Blurb Blurb.bannerTextFields = { text = true, explanation = true, tooltip = true, alt = true, link = true } function Blurb.new(protectionObj, args, cfg) return setmetatable({ _cfg = cfg, _protectionObj = protectionObj, _args = args }, Blurb) end -- Private methods -- function Blurb:_formatDate(num) -- Formats a Unix timestamp into dd Month, YYYY format. lang = lang or mw.language.getContentLanguage() local success, date = pcall( lang.formatDate, lang, self._cfg.msg['expiry-date-format'] or 'j F Y', '@' .. tostring(num) ) if success then return date end end function Blurb:_getExpandedMessage(msgKey) return self:_substituteParameters(self._cfg.msg[msgKey]) end function Blurb:_substituteParameters(msg) if not self._params then local parameterFuncs = {} parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter parameterFuncs.EDITREQUEST = self._makeEditRequestParameter parameterFuncs.EXPIRY = self._makeExpiryParameter parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter parameterFuncs.IMAGELINK = self._makeImageLinkParameter parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter parameterFuncs.PAGETYPE = self._makePagetypeParameter parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter parameterFuncs.TALKPAGE = self._makeTalkPageParameter parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter parameterFuncs.VANDAL = self._makeVandalTemplateParameter self._params = setmetatable({}, { __index = function (t, k) local param if parameterFuncs[k] then param = parameterFuncs[k](self) end param = param or '' t[k] = param return param end }) end msg = msg:gsub('${(%u+)}', self._params) return msg end function Blurb:_makeCurrentVersionParameter() -- A link to the page history or the move log, depending on the kind of -- protection. local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'move' then -- We need the move log link. return makeFullUrl( 'Special:Log', {type = 'move', page = pagename}, self:_getExpandedMessage('current-version-move-display') ) else -- We need the history link. return makeFullUrl( pagename, {action = 'history'}, self:_getExpandedMessage('current-version-edit-display') ) end end function Blurb:_makeEditRequestParameter() local mEditRequest = require('Module:Submit an edit request') local action = self._protectionObj.action local level = self._protectionObj.level -- Get the edit request type. local requestType if action == 'edit' then if level == 'autoconfirmed' then requestType = 'semi' elseif level == 'extendedconfirmed' then requestType = 'extended' elseif level == 'templateeditor' then requestType = 'template' end end requestType = requestType or 'full' -- Get the display value. local display = self:_getExpandedMessage('edit-request-display') return mEditRequest._link{type = requestType, display = display} end function Blurb:_makeExpiryParameter() local expiry = self._protectionObj.expiry if type(expiry) == 'number' then return self:_formatDate(expiry) else return expiry end end function Blurb:_makeExplanationBlurbParameter() -- Cover special cases first. if self._protectionObj.title.namespace == 8 then -- MediaWiki namespace return self:_getExpandedMessage('explanation-blurb-nounprotect') end -- Get explanation blurb table keys local action = self._protectionObj.action local level = self._protectionObj.level local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject' -- Find the message in the explanation blurb table and substitute any -- parameters. local explanations = self._cfg.explanationBlurbs local msg if explanations[action][level] and explanations[action][level][talkKey] then msg = explanations[action][level][talkKey] elseif explanations[action][level] and explanations[action][level].default then msg = explanations[action][level].default elseif explanations[action].default and explanations[action].default[talkKey] then msg = explanations[action].default[talkKey] elseif explanations[action].default and explanations[action].default.default then msg = explanations[action].default.default else error(string.format( 'could not find explanation blurb for action "%s", level "%s" and talk key "%s"', action, level, talkKey ), 8) end return self:_substituteParameters(msg) end function Blurb:_makeImageLinkParameter() local imageLinks = self._cfg.imageLinks local action = self._protectionObj.action local level = self._protectionObj.level local msg if imageLinks[action][level] then msg = imageLinks[action][level] elseif imageLinks[action].default then msg = imageLinks[action].default else msg = imageLinks.edit.default end return self:_substituteParameters(msg) end function Blurb:_makeIntroBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-blurb-expiry') else return self:_getExpandedMessage('intro-blurb-noexpiry') end end function Blurb:_makeIntroFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-fragment-expiry') else return self:_getExpandedMessage('intro-fragment-noexpiry') end end function Blurb:_makePagetypeParameter() local pagetypes = self._cfg.pagetypes return pagetypes[self._protectionObj.title.namespace] or pagetypes.default or error('no default pagetype defined', 8) end function Blurb:_makeProtectionBlurbParameter() local protectionBlurbs = self._cfg.protectionBlurbs local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionBlurbs[action][level] then msg = protectionBlurbs[action][level] elseif protectionBlurbs[action].default then msg = protectionBlurbs[action].default elseif protectionBlurbs.edit.default then msg = protectionBlurbs.edit.default else error('no protection blurb defined for protectionBlurbs.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionDateParameter() local protectionDate = self._protectionObj.protectionDate if type(protectionDate) == 'number' then return self:_formatDate(protectionDate) else return protectionDate end end function Blurb:_makeProtectionLevelParameter() local protectionLevels = self._cfg.protectionLevels local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionLevels[action][level] then msg = protectionLevels[action][level] elseif protectionLevels[action].default then msg = protectionLevels[action].default elseif protectionLevels.edit.default then msg = protectionLevels.edit.default else error('no protection level defined for protectionLevels.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionLogParameter() local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'autoreview' then -- We need the pending changes log. return makeFullUrl( 'Special:Log', {type = 'stable', page = pagename}, self:_getExpandedMessage('pc-log-display') ) else -- We need the protection log. return makeFullUrl( 'Special:Log', {type = 'protect', page = pagename}, self:_getExpandedMessage('protection-log-display') ) end end function Blurb:_makeTalkPageParameter() return string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[self._protectionObj.title.namespace].talk.name, self._protectionObj.title.text, self._args.section or 'top', self:_getExpandedMessage('talk-page-link-display') ) end function Blurb:_makeTooltipBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-blurb-expiry') else return self:_getExpandedMessage('tooltip-blurb-noexpiry') end end function Blurb:_makeTooltipFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-fragment-expiry') else return self:_getExpandedMessage('tooltip-fragment-noexpiry') end end function Blurb:_makeVandalTemplateParameter() return mw.getCurrentFrame():expandTemplate{ title="vandal-m", args={self._args.user or self._protectionObj.title.baseText} } end -- Public methods -- function Blurb:makeBannerText(key) -- Validate input. if not key or not Blurb.bannerTextFields[key] then error(string.format( '"%s" is not a valid banner config field', tostring(key) ), 2) end -- Generate the text. local msg = self._protectionObj.bannerConfig[key] if type(msg) == 'string' then return self:_substituteParameters(msg) elseif type(msg) == 'function' then msg = msg(self._protectionObj, self._args) if type(msg) ~= 'string' then error(string.format( 'bad output from banner config function with key "%s"' .. ' (expected string, got %s)', tostring(key), type(msg) ), 4) end return self:_substituteParameters(msg) end end -------------------------------------------------------------------------------- -- BannerTemplate class -------------------------------------------------------------------------------- local BannerTemplate = {} BannerTemplate.__index = BannerTemplate function BannerTemplate.new(protectionObj, cfg) local obj = {} obj._cfg = cfg -- Set the image filename. local imageFilename = protectionObj.bannerConfig.image if imageFilename then obj._imageFilename = imageFilename else -- If an image filename isn't specified explicitly in the banner config, -- generate it from the protection status and the namespace. local action = protectionObj.action local level = protectionObj.level local namespace = protectionObj.title.namespace local reason = protectionObj.reason -- Deal with special cases first. if ( namespace == 10 or namespace == 828 or reason and obj._cfg.indefImageReasons[reason] ) and action == 'edit' and level == 'sysop' and not protectionObj:isTemporary() then -- Fully protected modules and templates get the special red "indef" -- padlock. obj._imageFilename = obj._cfg.msg['image-filename-indef'] else -- Deal with regular protection types. local images = obj._cfg.images if images[action] then if images[action][level] then obj._imageFilename = images[action][level] elseif images[action].default then obj._imageFilename = images[action].default end end end end return setmetatable(obj, BannerTemplate) end function BannerTemplate:renderImage() local filename = self._imageFilename or self._cfg.msg['image-filename-default'] or 'Transparent.gif' return makeFileLink{ file = filename, size = (self.imageWidth or 20) .. 'px', alt = self._imageAlt, link = self._imageLink, caption = self.imageCaption } end -------------------------------------------------------------------------------- -- Banner class -------------------------------------------------------------------------------- local Banner = setmetatable({}, BannerTemplate) Banner.__index = Banner function Banner.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 40 obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip. obj._reasonText = blurbObj:makeBannerText('text') obj._explanationText = blurbObj:makeBannerText('explanation') obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing. return setmetatable(obj, Banner) end function Banner:__tostring() -- Renders the banner. makeMessageBox = makeMessageBox or require('Module:Message box').main local reasonText = self._reasonText or error('no reason text set', 2) local explanationText = self._explanationText local mbargs = { page = self._page, type = 'protection', image = self:renderImage(), text = string.format( "'''%s'''%s", reasonText, explanationText and '<br />' .. explanationText or '' ) } return makeMessageBox('mbox', mbargs) end -------------------------------------------------------------------------------- -- Padlock class -------------------------------------------------------------------------------- local Padlock = setmetatable({}, BannerTemplate) Padlock.__index = Padlock function Padlock.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 20 obj.imageCaption = blurbObj:makeBannerText('tooltip') obj._imageAlt = blurbObj:makeBannerText('alt') obj._imageLink = blurbObj:makeBannerText('link') obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action] or cfg.padlockIndicatorNames.default or 'pp-default' return setmetatable(obj, Padlock) end function Padlock:__tostring() local frame = mw.getCurrentFrame() -- The nowiki tag helps prevent whitespace at the top of articles. return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{ name = 'indicator', args = {name = self._indicatorName}, content = self:renderImage() } end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- This is used for testing purposes. return { Protection = Protection, Blurb = Blurb, BannerTemplate = BannerTemplate, Banner = Banner, Padlock = Padlock, } end function p._main(args, cfg, title) args = args or {} cfg = cfg or require(CONFIG_MODULE) local protectionObj = Protection.new(args, cfg, title) local ret = {} -- If a page's edit protection is equally or more restrictive than its -- protection from some other action, then don't bother displaying anything -- for the other action (except categories). if not yesno(args.catonly) and (protectionObj.action == 'edit' or args.demolevel or not getReachableNodes( cfg.hierarchy, protectionObj.level )[effectiveProtectionLevel('edit', protectionObj.title)]) then -- Initialise the blurb object local blurbObj = Blurb.new(protectionObj, args, cfg) -- Render the banner if protectionObj:shouldShowLock() then ret[#ret + 1] = tostring( (yesno(args.small) and Padlock or Banner) .new(protectionObj, blurbObj, cfg) ) end end -- Render the categories if yesno(args.category) ~= false then ret[#ret + 1] = protectionObj:makeCategoryLinks() end return table.concat(ret) end function p.main(frame, cfg) cfg = cfg or require(CONFIG_MODULE) -- Find default args, if any. local parent = frame.getParent and frame:getParent() local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')] -- Find user args, and use the parent frame if we are being called from a -- wrapper template. getArgs = getArgs or require('Module:Arguments').getArgs local userArgs = getArgs(frame, { parentOnly = defaultArgs, frameOnly = not defaultArgs }) -- Build the args table. User-specified args overwrite default args. local args = {} for k, v in pairs(defaultArgs or {}) do args[k] = v end for k, v in pairs(userArgs) do args[k] = v end return p._main(args, cfg) end return p b24b049f70572e29b1a408a5a11045d65118e43c Module:Protection banner/config 828 60 116 115 2022-07-12T15:20:10Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module provides configuration data for [[Module:Protection banner]]. return { -------------------------------------------------------------------------------- -- -- BANNER DATA -- -------------------------------------------------------------------------------- --[[ -- Banner data consists of six fields: -- * text - the main protection text that appears at the top of protection -- banners. -- * explanation - the text that appears below the main protection text, used -- to explain the details of the protection. -- * tooltip - the tooltip text you see when you move the mouse over a small -- padlock icon. -- * link - the page that the small padlock icon links to. -- * alt - the alt text for the small padlock icon. This is also used as tooltip -- text for the large protection banners. -- * image - the padlock image used in both protection banners and small padlock -- icons. -- -- The module checks in three separate tables to find a value for each field. -- First it checks the banners table, which has values specific to the reason -- for the page being protected. Then the module checks the defaultBanners -- table, which has values specific to each protection level. Finally, the -- module checks the masterBanner table, which holds data for protection -- templates to use if no data has been found in the previous two tables. -- -- The values in the banner data can take parameters. These are specified -- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name -- enclosed in curly braces). -- -- Available parameters: -- -- ${CURRENTVERSION} - a link to the page history or the move log, with the -- display message "current-version-edit-display" or -- "current-version-move-display". -- -- ${EDITREQUEST} - a link to create an edit request for the current page. -- -- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes -- on the talk page; you may submit a request to ask an administrator to make -- an edit if it is minor or supported by consensus." -- -- ${IMAGELINK} - a link to set the image to, depending on the protection -- action and protection level. -- -- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry -- is set. E.g. "Editing of this page by new or unregistered users is currently -- disabled until dd Month YYYY." -- -- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation -- so that it can be used in run-on sentences. -- -- ${PAGETYPE} - the type of the page, e.g. "article" or "template". -- Defined in the cfg.pagetypes table. -- -- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g. -- "Editing of this page by new or unregistered users is currently disabled" -- -- ${PROTECTIONDATE} - the protection date, if it has been supplied to the -- template. -- -- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or -- "semi-protected". -- -- ${PROTECTIONLOG} - a link to the protection log or the pending changes log, -- depending on the protection action. -- -- ${TALKPAGE} - a link to the talk page. If a section is specified, links -- straight to that talk page section. -- -- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to -- create a blurb like "This template is semi-protected", or "This article is -- move-protected until DD Month YYYY". -- -- ${VANDAL} - links for the specified username (or the root page name) -- using Module:Vandal-m. -- -- Functions -- -- For advanced users, it is possible to use Lua functions instead of strings -- in the banner config tables. Using functions gives flexibility that is not -- possible just by using parameters. Functions take two arguments, the -- protection object and the template arguments, and they must output a string. -- -- For example: -- -- text = function (protectionObj, args) -- if protectionObj.level == 'autoconfirmed' then -- return 'foo' -- else -- return 'bar' -- end -- end -- -- Some protection object properties and methods that may be useful: -- protectionObj.action - the protection action -- protectionObj.level - the protection level -- protectionObj.reason - the protection reason -- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set -- to indefinite, and the protection time in unix time if temporary. -- protectionObj.protectionDate - the protection date in unix time, or nil if -- unspecified. -- protectionObj.bannerConfig - the banner config found by the module. Beware -- of editing the config field used by the function, as it could create an -- infinite loop. -- protectionObj:isProtected - returns a boolean showing whether the page is -- protected. -- protectionObj:isTemporary - returns a boolean showing whether the expiry is -- temporary. -- protectionObj:isIncorrect - returns a boolean showing whether the protection -- template is incorrect. --]] -- The master banner data, used if no values have been found in banners or -- defaultBanners. masterBanner = { text = '${INTROBLURB}', explanation = '${EXPLANATIONBLURB}', tooltip = '${TOOLTIPBLURB}', link = '${IMAGELINK}', alt = 'Page ${PROTECTIONLEVEL}' }, -- The default banner data. This holds banner data for different protection -- levels. -- *required* - this table needs edit, move, autoreview and upload subtables. defaultBanners = { edit = {}, move = {}, autoreview = { default = { alt = 'Page protected with pending changes', tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users', image = 'Pending-protection-shackle.svg' } }, upload = {} }, -- The banner data. This holds banner data for different protection reasons. -- In fact, the reasons specified in this table control which reasons are -- valid inputs to the first positional parameter. -- -- There is also a non-standard "description" field that can be used for items -- in this table. This is a description of the protection reason for use in the -- module documentation. -- -- *required* - this table needs edit, move, autoreview and upload subtables. banners = { edit = { blp = { description = 'For pages protected to promote compliance with the' .. ' [[Wikipedia:Biographies of living persons' .. '|biographies of living persons]] policy', text = '${INTROFRAGMENT} to promote compliance with' .. ' [[Wikipedia:Biographies of living persons' .. "|Wikipedia's&nbsp;policy on&nbsp;the&nbsp;biographies" .. ' of&nbsp;living&nbsp;people]].', tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on' .. ' biographies of living persons', }, dmca = { description = 'For pages protected by the Wikimedia Foundation' .. ' due to [[Digital Millennium Copyright Act]] takedown requests', explanation = function (protectionObj, args) local ret = 'Pursuant to a rights owner notice under the Digital' .. ' Millennium Copyright Act (DMCA) regarding some content' .. ' in this article, the Wikimedia Foundation acted under' .. ' applicable law and took down and restricted the content' .. ' in question.' if args.notice then ret = ret .. ' A copy of the received notice can be found here: ' .. args.notice .. '.' end ret = ret .. ' For more information, including websites discussing' .. ' how to file a counter-notice, please see' .. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}." .. "'''Do not remove this template from the article until the" .. " restrictions are withdrawn'''." return ret end, image = 'Office-protection-shackle.svg', }, dispute = { description = 'For pages protected due to editing disputes', text = function (protectionObj, args) -- Find the value of "disputes". local display = 'disputes' local disputes if args.section then disputes = string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[protectionObj.title.namespace].talk.name, protectionObj.title.text, args.section, display ) else disputes = display end -- Make the blurb, depending on the expiry. local msg if type(protectionObj.expiry) == 'number' then msg = '${INTROFRAGMENT} or until editing %s have been resolved.' else msg = '${INTROFRAGMENT} until editing %s have been resolved.' end return string.format(msg, disputes) end, explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', tooltip = '${TOOLTIPFRAGMENT} due to editing disputes', }, ecp = { description = 'For articles in topic areas authorized by' .. ' [[Wikipedia:Arbitration Committee|ArbCom]] or' .. ' meets the criteria for community use', tooltip = 'This ${PAGETYPE} is extended-confirmed protected', alt = 'Extended-protected ${PAGETYPE}', }, mainpage = { description = 'For pages protected for being displayed on the [[Main Page]]', text = 'This file is currently' .. ' [[Wikipedia:This page is protected|protected]] from' .. ' editing because it is currently or will soon be displayed' .. ' on the [[Main Page]].', explanation = 'Images on the Main Page are protected due to their high' .. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.' .. '<br /><span style="font-size:90%;">' .. "'''Administrators:''' Once this image is definitely off the Main Page," .. ' please unprotect this file, or reduce to semi-protection,' .. ' as appropriate.</span>', }, office = { description = 'For pages protected by the Wikimedia Foundation', text = function (protectionObj, args) local ret = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.' if protectionObj.protectionDate then ret = ret .. ' It has been protected since ${PROTECTIONDATE}.' end return ret end, explanation = "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not remove protection from this" .. " page unless you are authorized by the Wikimedia Foundation to do" .. " so.'''", image = 'Office-protection-shackle.svg', }, reset = { description = 'For pages protected by the Wikimedia Foundation and' .. ' "reset" to a bare-bones version', text = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.', explanation = function (protectionObj, args) local ret = '' if protectionObj.protectionDate then ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was' else ret = ret .. 'This ${PAGETYPE} has been' end ret = ret .. ' reduced to a' .. ' simplified, "bare bones" version so that it may be completely' .. ' rewritten to ensure it meets the policies of' .. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].' .. ' Standard Wikipedia policies will apply to its rewriting—which' .. ' will eventually be open to all editors—and will be strictly' .. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while' .. ' it is being rebuilt.\n\n' .. 'Any insertion of material directly from' .. ' pre-protection revisions of the ${PAGETYPE} will be removed, as' .. ' will any material added to the ${PAGETYPE} that is not properly' .. ' sourced. The associated talk page(s) were also cleared on the' .. " same date.\n\n" .. "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not override" .. " this action, and do not remove protection from this page," .. " unless you are authorized by the Wikimedia Foundation" .. " to do so. No editor may remove this notice.'''" return ret end, image = 'Office-protection-shackle.svg', }, sock = { description = 'For pages protected due to' .. ' [[Wikipedia:Sock puppetry|sock puppetry]]', text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of' .. ' [[Wikipedia:Blocking policy|blocked]] or' .. ' [[Wikipedia:Banning policy|banned users]]' .. ' from editing it.', tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from' .. ' editing it', }, template = { description = 'For [[Wikipedia:High-risk templates|high-risk]]' .. ' templates and Lua modules', text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},' .. ' as it is [[Wikipedia:High-risk templates|high-risk]].', explanation = 'Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] or' .. ' [[Wikipedia:Template editor|template editor]] to make an edit if' .. ' it is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by' .. ' [[Wikipedia:Consensus|consensus]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}' .. ' to prevent vandalism', alt = 'Permanently protected ${PAGETYPE}', }, usertalk = { description = 'For pages protected against disruptive edits by a' .. ' particular user', text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,' .. ' such as abusing the' .. ' &#123;&#123;[[Template:unblock|unblock]]&#125;&#125; template.', explanation = 'If you cannot edit this user talk page and you need to' .. ' make a change or leave a message, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for edits to a protected page' .. '|request an edit]],' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]],' .. ' [[Special:Userlogin|log in]],' .. ' or [[Special:UserLogin/signup|create an account]].', }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism|vandalism]]', text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].', explanation = function (protectionObj, args) local ret = '' if protectionObj.level == 'sysop' then ret = ret .. "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ' end return ret .. '${EXPLANATIONBLURB}' end, tooltip = '${TOOLTIPFRAGMENT} due to vandalism', } }, move = { dispute = { description = 'For pages protected against page moves due to' .. ' disputes over the page title', explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', image = 'Move-protection-shackle.svg' }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism#Page-move vandalism' .. ' |page-move vandalism]]' } }, autoreview = {}, upload = {} }, -------------------------------------------------------------------------------- -- -- GENERAL DATA TABLES -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Protection blurbs -------------------------------------------------------------------------------- -- This table produces the protection blurbs available with the -- ${PROTECTIONBLURB} parameter. It is sorted by protection action and -- protection level, and is checked by the module in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionBlurbs = { edit = { default = 'This ${PAGETYPE} is currently [[Help:Protection|' .. 'protected]] from editing', autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access' .. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered' .. ' users|unregistered]] users is currently [[Help:Protection|disabled]]', extendedconfirmed = 'This ${PAGETYPE} is currently under extended confirmed protection', }, move = { default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]' .. ' from [[Help:Moving a page|page moves]]' }, autoreview = { default = 'All edits made to this ${PAGETYPE} by' .. ' [[Wikipedia:User access levels#New users|new]] or' .. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]' .. ' users are currently' .. ' [[Wikipedia:Pending changes|subject to review]]' }, upload = { default = 'Uploading new versions of this ${PAGETYPE} is currently disabled' } }, -------------------------------------------------------------------------------- -- Explanation blurbs -------------------------------------------------------------------------------- -- This table produces the explanation blurbs available with the -- ${EXPLANATIONBLURB} parameter. It is sorted by protection action, -- protection level, and whether the page is a talk page or not. If the page is -- a talk page it will have a talk key of "talk"; otherwise it will have a talk -- key of "subject". The table is checked in the following order: -- 1. page's protection action, page's protection level, page's talk key -- 2. page's protection action, page's protection level, default talk key -- 3. page's protection action, default protection level, page's talk key -- 4. page's protection action, default protection level, default talk key -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. explanationBlurbs = { edit = { autoconfirmed = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', }, extendedconfirmed = { default = 'Extended confirmed protection prevents edits from all unregistered editors' .. ' and registered users with fewer than 30 days tenure and 500 edits.' .. ' The [[Wikipedia:Protection policy#extended|policy on community use]]' .. ' specifies that extended confirmed protection can be applied to combat' .. ' disruption, if semi-protection has proven to be ineffective.' .. ' Extended confirmed protection may also be applied to enforce' .. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].' .. ' Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask for uncontroversial changes supported by' .. ' [[Wikipedia:Consensus|consensus]].' }, default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]]. You may also [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|request]] that this page be unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' You may [[Wikipedia:Requests for page' .. ' protection#Current requests for edits to a protected page|request an' .. ' edit]] to this page, or [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|ask]] for it to be unprotected.' } }, move = { default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves on the' .. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves at' .. ' [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.' } }, autoreview = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Edits to this ${PAGETYPE} by new and unregistered users' .. ' will not be visible to readers until they are accepted by' .. ' a reviewer. To avoid the need for your edits to be' .. ' reviewed, you may' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].' }, }, upload = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but new versions of the file' .. ' cannot be uploaded until it is unprotected. You can' .. ' request that a new version be uploaded by using a' .. ' [[Wikipedia:Edit requests|protected edit request]], or you' .. ' can [[Wikipedia:Requests for page protection|request]]' .. ' that the file be unprotected.' } } }, -------------------------------------------------------------------------------- -- Protection levels -------------------------------------------------------------------------------- -- This table provides the data for the ${PROTECTIONLEVEL} parameter, which -- produces a short label for different protection levels. It is sorted by -- protection action and protection level, and is checked in the following -- order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionLevels = { edit = { default = 'protected', templateeditor = 'template-protected', extendedconfirmed = 'extended-protected', autoconfirmed = 'semi-protected', }, move = { default = 'move-protected' }, autoreview = { }, upload = { default = 'upload-protected' } }, -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- This table lists different padlock images for each protection action and -- protection level. It is used if an image is not specified in any of the -- banner data tables, and if the page does not satisfy the conditions for using -- the ['image-filename-indef'] image. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level images = { edit = { default = 'Full-protection-shackle.svg', templateeditor = 'Template-protection-shackle.svg', extendedconfirmed = 'Extended-protection-shackle.svg', autoconfirmed = 'Semi-protection-shackle.svg' }, move = { default = 'Move-protection-shackle.svg', }, autoreview = { default = 'Pending-protection-shackle.svg' }, upload = { default = 'Upload-protection-shackle.svg' } }, -- Pages with a reason specified in this table will show the special "indef" -- padlock, defined in the 'image-filename-indef' message, if no expiry is set. indefImageReasons = { template = true }, -------------------------------------------------------------------------------- -- Image links -------------------------------------------------------------------------------- -- This table provides the data for the ${IMAGELINK} parameter, which gets -- the image link for small padlock icons based on the page's protection action -- and protection level. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. imageLinks = { edit = { default = 'Wikipedia:Protection policy#full', templateeditor = 'Wikipedia:Protection policy#template', extendedconfirmed = 'Wikipedia:Protection policy#extended', autoconfirmed = 'Wikipedia:Protection policy#semi' }, move = { default = 'Wikipedia:Protection policy#move' }, autoreview = { default = 'Wikipedia:Protection policy#pending' }, upload = { default = 'Wikipedia:Protection policy#upload' } }, -------------------------------------------------------------------------------- -- Padlock indicator names -------------------------------------------------------------------------------- -- This table provides the "name" attribute for the <indicator> extension tag -- with which small padlock icons are generated. All indicator tags on a page -- are displayed in alphabetical order based on this attribute, and with -- indicator tags with duplicate names, the last tag on the page wins. -- The attribute is chosen based on the protection action; table keys must be a -- protection action name or the string "default". padlockIndicatorNames = { autoreview = 'pp-autoreview', default = 'pp-default' }, -------------------------------------------------------------------------------- -- Protection categories -------------------------------------------------------------------------------- --[[ -- The protection categories are stored in the protectionCategories table. -- Keys to this table are made up of the following strings: -- -- 1. the expiry date -- 2. the namespace -- 3. the protection reason (e.g. "dispute" or "vandalism") -- 4. the protection level (e.g. "sysop" or "autoconfirmed") -- 5. the action (e.g. "edit" or "move") -- -- When the module looks up a category in the table, first it will will check to -- see a key exists that corresponds to all five parameters. For example, a -- user page semi-protected from vandalism for two weeks would have the key -- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module -- changes the first part of the key to "all" and checks the table again. It -- keeps checking increasingly generic key combinations until it finds the -- field, or until it reaches the key "all-all-all-all-all". -- -- The module uses a binary matrix to determine the order in which to search. -- This is best demonstrated by a table. In this table, the "0" values -- represent "all", and the "1" values represent the original data (e.g. -- "indef" or "file" or "vandalism"). -- -- expiry namespace reason level action -- order -- 1 1 1 1 1 1 -- 2 0 1 1 1 1 -- 3 1 0 1 1 1 -- 4 0 0 1 1 1 -- 5 1 1 0 1 1 -- 6 0 1 0 1 1 -- 7 1 0 0 1 1 -- 8 0 0 0 1 1 -- 9 1 1 1 0 1 -- 10 0 1 1 0 1 -- 11 1 0 1 0 1 -- 12 0 0 1 0 1 -- 13 1 1 0 0 1 -- 14 0 1 0 0 1 -- 15 1 0 0 0 1 -- 16 0 0 0 0 1 -- 17 1 1 1 1 0 -- 18 0 1 1 1 0 -- 19 1 0 1 1 0 -- 20 0 0 1 1 0 -- 21 1 1 0 1 0 -- 22 0 1 0 1 0 -- 23 1 0 0 1 0 -- 24 0 0 0 1 0 -- 25 1 1 1 0 0 -- 26 0 1 1 0 0 -- 27 1 0 1 0 0 -- 28 0 0 1 0 0 -- 29 1 1 0 0 0 -- 30 0 1 0 0 0 -- 31 1 0 0 0 0 -- 32 0 0 0 0 0 -- -- In this scheme the action has the highest priority, as it is the last -- to change, and the expiry has the least priority, as it changes the most. -- The priorities of the expiry, the protection level and the action are -- fixed, but the priorities of the reason and the namespace can be swapped -- through the use of the cfg.bannerDataNamespaceHasPriority table. --]] -- If the reason specified to the template is listed in this table, -- namespace data will take priority over reason data in the protectionCategories -- table. reasonsWithNamespacePriority = { vandalism = true, }, -- The string to use as a namespace key for the protectionCategories table for each -- namespace number. categoryNamespaceKeys = { [ 2] = 'user', [ 3] = 'user', [ 4] = 'project', [ 6] = 'file', [ 8] = 'mediawiki', [ 10] = 'template', [ 12] = 'project', [ 14] = 'category', [100] = 'portal', [828] = 'module', }, protectionCategories = { ['all|all|all|all|all'] = 'Wikipedia fully protected pages', ['all|all|office|all|all'] = 'Wikipedia Office-protected pages', ['all|all|reset|all|all'] = 'Wikipedia Office-protected pages', ['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages', ['all|all|mainpage|all|all'] = 'Wikipedia fully-protected main page files', ['all|all|all|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|template|all|all|edit'] = 'Wikipedia fully protected templates', ['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages', ['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages', ['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people', ['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people', ['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute', ['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users', ['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism', ['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories', ['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files', ['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals', ['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages', ['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages', ['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates', ['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages', ['all|all|all|templateeditor|edit'] = 'Wikipedia template-protected pages other than templates and modules', ['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates', ['all|template|all|templateeditor|move'] = 'Wikipedia template-protected templates', -- move-protected templates ['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people', ['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people', ['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute', ['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users', ['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism', ['all|category|all|sysop|edit'] = 'Wikipedia fully protected categories', ['all|file|all|sysop|edit'] = 'Wikipedia fully-protected files', ['all|project|all|sysop|edit'] = 'Wikipedia fully-protected project pages', ['all|talk|all|sysop|edit'] = 'Wikipedia fully-protected talk pages', ['all|template|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates', ['all|user|all|sysop|edit'] = 'Wikipedia fully protected user and user talk pages', ['all|module|all|all|edit'] = 'Wikipedia fully-protected modules', ['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules', ['all|module|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected modules', ['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules', ['all|all|all|sysop|move'] = 'Wikipedia move-protected pages', ['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages', ['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute', ['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism', ['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals', ['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages', ['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages', ['all|template|all|sysop|move'] = 'Wikipedia move-protected templates', ['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages', ['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages', ['all|file|all|all|upload'] = 'Wikipedia upload-protected files', }, -------------------------------------------------------------------------------- -- Expiry category config -------------------------------------------------------------------------------- -- This table configures the expiry category behaviour for each protection -- action. -- * If set to true, setting that action will always categorise the page if -- an expiry parameter is not set. -- * If set to false, setting that action will never categorise the page. -- * If set to nil, the module will categorise the page if: -- 1) an expiry parameter is not set, and -- 2) a reason is provided, and -- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck -- table. expiryCheckActions = { edit = nil, move = false, autoreview = true, upload = false }, reasonsWithoutExpiryCheck = { blp = true, template = true, }, -------------------------------------------------------------------------------- -- Pagetypes -------------------------------------------------------------------------------- -- This table produces the page types available with the ${PAGETYPE} parameter. -- Keys are namespace numbers, or the string "default" for the default value. pagetypes = { [0] = 'article', [6] = 'file', [10] = 'template', [14] = 'category', [828] = 'module', default = 'page' }, -------------------------------------------------------------------------------- -- Strings marking indefinite protection -------------------------------------------------------------------------------- -- This table contains values passed to the expiry parameter that mean the page -- is protected indefinitely. indefStrings = { ['indef'] = true, ['indefinite'] = true, ['indefinitely'] = true, ['infinite'] = true, }, -------------------------------------------------------------------------------- -- Group hierarchy -------------------------------------------------------------------------------- -- This table maps each group to all groups that have a superset of the original -- group's page editing permissions. hierarchy = { sysop = {}, reviewer = {'sysop'}, filemover = {'sysop'}, templateeditor = {'sysop'}, extendedconfirmed = {'sysop'}, autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'}, user = {'autoconfirmed'}, ['*'] = {'user'} }, -------------------------------------------------------------------------------- -- Wrapper templates and their default arguments -------------------------------------------------------------------------------- -- This table contains wrapper templates used with the module, and their -- default arguments. Templates specified in this table should contain the -- following invocation, and no other template content: -- -- {{#invoke:Protection banner|main}} -- -- If other content is desired, it can be added between -- <noinclude>...</noinclude> tags. -- -- When a user calls one of these wrapper templates, they will use the -- default arguments automatically. However, users can override any of the -- arguments. wrappers = { ['Template:Pp'] = {}, ['Template:Pp-extended'] = {'ecp'}, ['Template:Pp-blp'] = {'blp'}, -- we don't need Template:Pp-create ['Template:Pp-dispute'] = {'dispute'}, ['Template:Pp-main-page'] = {'mainpage'}, ['Template:Pp-move'] = {action = 'move', catonly = 'yes'}, ['Template:Pp-move-dispute'] = {'dispute', action = 'move', catonly = 'yes'}, -- we don't need Template:Pp-move-indef ['Template:Pp-move-vandalism'] = {'vandalism', action = 'move', catonly = 'yes'}, ['Template:Pp-office'] = {'office'}, ['Template:Pp-office-dmca'] = {'dmca'}, ['Template:Pp-pc'] = {action = 'autoreview', small = true}, ['Template:Pp-pc1'] = {action = 'autoreview', small = true}, ['Template:Pp-reset'] = {'reset'}, ['Template:Pp-semi-indef'] = {small = true}, ['Template:Pp-sock'] = {'sock'}, ['Template:Pp-template'] = {'template', small = true}, ['Template:Pp-upload'] = {action = 'upload'}, ['Template:Pp-usertalk'] = {'usertalk'}, ['Template:Pp-vandalism'] = {'vandalism'}, }, -------------------------------------------------------------------------------- -- -- MESSAGES -- -------------------------------------------------------------------------------- msg = { -------------------------------------------------------------------------------- -- Intro blurb and intro fragment -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${INTROBLURB} and -- ${INTROFRAGMENT} parameters. If the protection is temporary they use the -- intro-blurb-expiry or intro-fragment-expiry, and if not they use -- intro-blurb-noexpiry or intro-fragment-noexpiry. -- It is possible to use banner parameters in these messages. ['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.', ['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.', ['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},', ['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}', -------------------------------------------------------------------------------- -- Tooltip blurb -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${TOOLTIPBLURB} parameter. -- If the protection is temporary the tooltip-blurb-expiry message is used, and -- if not the tooltip-blurb-noexpiry message is used. -- It is possible to use banner parameters in these messages. ['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.', ['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.', ['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},', ['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', -------------------------------------------------------------------------------- -- Special explanation blurb -------------------------------------------------------------------------------- -- An explanation blurb for pages that cannot be unprotected, e.g. for pages -- in the MediaWiki namespace. -- It is possible to use banner parameters in this message. ['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]].', -------------------------------------------------------------------------------- -- Protection log display values -------------------------------------------------------------------------------- -- These messages determine the display values for the protection log link -- or the pending changes log link produced by the ${PROTECTIONLOG} parameter. -- It is possible to use banner parameters in these messages. ['protection-log-display'] = 'protection log', ['pc-log-display'] = 'pending changes log', -------------------------------------------------------------------------------- -- Current version display values -------------------------------------------------------------------------------- -- These messages determine the display values for the page history link -- or the move log link produced by the ${CURRENTVERSION} parameter. -- It is possible to use banner parameters in these messages. ['current-version-move-display'] = 'current title', ['current-version-edit-display'] = 'current version', -------------------------------------------------------------------------------- -- Talk page -------------------------------------------------------------------------------- -- This message determines the display value of the talk page link produced -- with the ${TALKPAGE} parameter. -- It is possible to use banner parameters in this message. ['talk-page-link-display'] = 'talk page', -------------------------------------------------------------------------------- -- Edit requests -------------------------------------------------------------------------------- -- This message determines the display value of the edit request link produced -- with the ${EDITREQUEST} parameter. -- It is possible to use banner parameters in this message. ['edit-request-display'] = 'submit an edit request', -------------------------------------------------------------------------------- -- Expiry date format -------------------------------------------------------------------------------- -- This is the format for the blurb expiry date. It should be valid input for -- the first parameter of the #time parser function. ['expiry-date-format'] = 'F j, Y "at" H:i e', -------------------------------------------------------------------------------- -- Tracking categories -------------------------------------------------------------------------------- -- These messages determine which tracking categories the module outputs. ['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates', ['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules', -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- These are images that are not defined by their protection action and protection level. ['image-filename-indef'] = 'Full-protection-shackle.svg', ['image-filename-default'] = 'Transparent.gif', -------------------------------------------------------------------------------- -- End messages -------------------------------------------------------------------------------- } -------------------------------------------------------------------------------- -- End configuration -------------------------------------------------------------------------------- } 7b4133071e798dbabff5c4e8628e5537a1d376e3 Module:String 828 61 118 117 2022-07-12T15:20:11Z 17ademoladav 2 1 revision imported Scribunto text/plain --[[ This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. Global options ignore_errors: If set to 'true' or 1, any error condition will result in an empty string being returned rather than an error message. error_category: If an error occurs, specifies the name of a category to include with the error message. The default category is [Category:Errors reported by Module String]. no_category: If set to 'true' or 1, no category will be added if an error is generated. Unit tests for this module are available at Module:String/tests. ]] local str = {} --[[ len This function returns the length of the target string. Usage: {{#invoke:String|len|target_string|}} OR {{#invoke:String|len|s=target_string}} Parameters s: The string whose length to report If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. ]] function str.len( frame ) local new_args = str._getParameters( frame.args, {'s'} ) local s = new_args['s'] or '' return mw.ustring.len( s ) end --[[ sub This function returns a substring of the target string at specified indices. Usage: {{#invoke:String|sub|target_string|start_index|end_index}} OR {{#invoke:String|sub|s=target_string|i=start_index|j=end_index}} Parameters s: The string to return a subset of i: The fist index of the substring to return, defaults to 1. j: The last index of the string to return, defaults to the last character. The first character of the string is assigned an index of 1. If either i or j is a negative value, it is interpreted the same as selecting a character by counting from the end of the string. Hence, a value of -1 is the same as selecting the last character of the string. If the requested indices are out of range for the given string, an error is reported. ]] function str.sub( frame ) local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } ) local s = new_args['s'] or '' local i = tonumber( new_args['i'] ) or 1 local j = tonumber( new_args['j'] ) or -1 local len = mw.ustring.len( s ) -- Convert negatives for range checking if i < 0 then i = len + i + 1 end if j < 0 then j = len + j + 1 end if i > len or j > len or i < 1 or j < 1 then return str._error( 'String subset index out of range' ) end if j < i then return str._error( 'String subset indices out of order' ) end return mw.ustring.sub( s, i, j ) end --[[ This function implements that features of {{str sub old}} and is kept in order to maintain these older templates. ]] function str.sublength( frame ) local i = tonumber( frame.args.i ) or 0 local len = tonumber( frame.args.len ) return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) ) end --[[ _match This function returns a substring from the source string that matches a specified pattern. It is exported for use in other modules Usage: strmatch = require("Module:String")._match sresult = strmatch( s, pattern, start, match, plain, nomatch ) Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This sub-routine is exported for use in other modules function str._match( s, pattern, start, match_index, plain_flag, nomatch ) if s == '' then return str._error( 'Target string is empty' ) end if pattern == '' then return str._error( 'Pattern string is empty' ) end start = tonumber(start) or 1 if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then return str._error( 'Requested start is out of range' ) end if match_index == 0 then return str._error( 'Match index is out of range' ) end if plain_flag then pattern = str._escapePattern( pattern ) end local result if match_index == 1 then -- Find first match is simple case result = mw.ustring.match( s, pattern, start ) else if start > 1 then s = mw.ustring.sub( s, start ) end local iterator = mw.ustring.gmatch(s, pattern) if match_index > 0 then -- Forward search for w in iterator do match_index = match_index - 1 if match_index == 0 then result = w break end end else -- Reverse search local result_table = {} local count = 1 for w in iterator do result_table[count] = w count = count + 1 end result = result_table[ count + match_index ] end end if result == nil then if nomatch == nil then return str._error( 'Match not found' ) else return nomatch end else return result end end --[[ match This function returns a substring from the source string that matches a specified pattern. Usage: {{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}} OR {{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index |match=match_number|plain=plain_flag|nomatch=nomatch_output}} Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from each string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. If the match_number or start_index are out of range for the string being queried, then this function generates an error. An error is also generated if no match is found. If one adds the parameter ignore_errors=true, then the error will be suppressed and an empty string will be returned on any failure. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This is the entry point for #invoke:String|match function str.match( frame ) local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} ) local s = new_args['s'] or '' local start = tonumber( new_args['start'] ) or 1 local plain_flag = str._getBoolean( new_args['plain'] or false ) local pattern = new_args['pattern'] or '' local match_index = math.floor( tonumber(new_args['match']) or 1 ) local nomatch = new_args['nomatch'] return str._match( s, pattern, start, match_index, plain_flag, nomatch ) end --[[ pos This function returns a single character from the target string at position pos. Usage: {{#invoke:String|pos|target_string|index_value}} OR {{#invoke:String|pos|target=target_string|pos=index_value}} Parameters target: The string to search pos: The index for the character to return If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. The first character has an index value of 1. If one requests a negative value, this function will select a character by counting backwards from the end of the string. In other words pos = -1 is the same as asking for the last character. A requested value of zero, or a value greater than the length of the string returns an error. ]] function str.pos( frame ) local new_args = str._getParameters( frame.args, {'target', 'pos'} ) local target_str = new_args['target'] or '' local pos = tonumber( new_args['pos'] ) or 0 if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then return str._error( 'String index out of range' ) end return mw.ustring.sub( target_str, pos, pos ) end --[[ str_find This function duplicates the behavior of {{str_find}}, including all of its quirks. This is provided in order to support existing templates, but is NOT RECOMMENDED for new code and templates. New code is recommended to use the "find" function instead. Returns the first index in "source" that is a match to "target". Indexing is 1-based, and the function returns -1 if the "target" string is not present in "source". Important Note: If the "target" string is empty / missing, this function returns a value of "1", which is generally unexpected behavior, and must be accounted for separatetly. ]] function str.str_find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target'} ) local source_str = new_args['source'] or '' local target_str = new_args['target'] or '' if target_str == '' then return 1 end local start = mw.ustring.find( source_str, target_str, 1, true ) if start == nil then start = -1 end return start end --[[ find This function allows one to search for a target string or pattern within another string. Usage: {{#invoke:String|find|source_str|target_string|start_index|plain_flag}} OR {{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}} Parameters source: The string to search target: The string or pattern to find within source start: The index within the source string to start the search, defaults to 1 plain: Boolean flag indicating that target should be understood as plain text and not as a Lua style regular expression, defaults to true If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. This function returns the first index >= "start" where "target" can be found within "source". Indices are 1-based. If "target" is not found, then this function returns 0. If either "source" or "target" are missing / empty, this function also returns 0. This function should be safe for UTF-8 strings. ]] function str.find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['target'] or '' local start_pos = tonumber(new_args['start']) or 1 local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return 0 end plain = str._getBoolean( plain ) local start = mw.ustring.find( source_str, pattern, start_pos, plain ) if start == nil then start = 0 end return start end --[[ replace This function allows one to replace a target string or pattern within another string. Usage: {{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}} OR {{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string| count=replacement_count|plain=plain_flag}} Parameters source: The string to search pattern: The string or pattern to find within source replace: The replacement text count: The number of occurences to replace, defaults to all. plain: Boolean flag indicating that pattern should be understood as plain text and not as a Lua style regular expression, defaults to true ]] function str.replace( frame ) local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['pattern'] or '' local replace = new_args['replace'] or '' local count = tonumber( new_args['count'] ) local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return source_str end plain = str._getBoolean( plain ) if plain then pattern = str._escapePattern( pattern ) replace = mw.ustring.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences. end local result if count ~= nil then result = mw.ustring.gsub( source_str, pattern, replace, count ) else result = mw.ustring.gsub( source_str, pattern, replace ) end return result end --[[ simple function to pipe string.rep to templates. ]] function str.rep( frame ) local repetitions = tonumber( frame.args[2] ) if not repetitions then return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' ) end return string.rep( frame.args[1] or '', repetitions ) end --[[ escapePattern This function escapes special characters from a Lua string pattern. See [1] for details on how patterns work. [1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns Usage: {{#invoke:String|escapePattern|pattern_string}} Parameters pattern_string: The pattern string to escape. ]] function str.escapePattern( frame ) local pattern_str = frame.args[1] if not pattern_str then return str._error( 'No pattern string specified' ) end local result = str._escapePattern( pattern_str ) return result end --[[ count This function counts the number of occurrences of one string in another. ]] function str.count(frame) local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'}) local source = args.source or '' local pattern = args.pattern or '' local plain = str._getBoolean(args.plain or true) if plain then pattern = str._escapePattern(pattern) end local _, count = mw.ustring.gsub(source, pattern, '') return count end --[[ endswith This function determines whether a string ends with another string. ]] function str.endswith(frame) local args = str._getParameters(frame.args, {'source', 'pattern'}) local source = args.source or '' local pattern = args.pattern or '' if pattern == '' then -- All strings end with the empty string. return "yes" end if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then return "yes" else return "" end end --[[ join Join all non empty arguments together; the first argument is the separator. Usage: {{#invoke:String|join|sep|one|two|three}} ]] function str.join(frame) local args = {} local sep for _, v in ipairs( frame.args ) do if sep then if v ~= '' then table.insert(args, v) end else sep = v end end return table.concat( args, sep or '' ) end --[[ Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters. This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application. ]] function str._getParameters( frame_args, arg_list ) local new_args = {} local index = 1 local value for _, arg in ipairs( arg_list ) do value = frame_args[arg] if value == nil then value = frame_args[index] index = index + 1 end new_args[arg] = value end return new_args end --[[ Helper function to handle error messages. ]] function str._error( error_str ) local frame = mw.getCurrentFrame() local error_category = frame.args.error_category or 'Errors reported by Module String' local ignore_errors = frame.args.ignore_errors or false local no_category = frame.args.no_category or false if str._getBoolean(ignore_errors) then return '' end local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>' if error_category ~= '' and not str._getBoolean( no_category ) then error_str = '[[Category:' .. error_category .. ']]' .. error_str end return error_str end --[[ Helper Function to interpret boolean strings ]] function str._getBoolean( boolean_str ) local boolean_value if type( boolean_str ) == 'string' then boolean_str = boolean_str:lower() if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0' or boolean_str == '' then boolean_value = false else boolean_value = true end elseif type( boolean_str ) == 'boolean' then boolean_value = boolean_str else error( 'No boolean value found' ) end return boolean_value end --[[ Helper function that escapes all pattern characters so that they will be treated as plain text. ]] function str._escapePattern( pattern_str ) return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" ) end return str 6df794dd52434e0f6a372c9918f5a9dedd15f579 Module:TableTools 828 62 120 119 2022-07-12T15:20:11Z 17ademoladav 2 1 revision imported Scribunto text/plain ------------------------------------------------------------------------------------ -- TableTools -- -- -- -- This module includes a number of functions for dealing with Lua tables. -- -- It is a meta-module, meant to be called from other Lua modules, and should not -- -- be called directly from #invoke. -- ------------------------------------------------------------------------------------ local libraryUtil = require('libraryUtil') local p = {} -- Define often-used variables and functions. local floor = math.floor local infinity = math.huge local checkType = libraryUtil.checkType local checkTypeMulti = libraryUtil.checkTypeMulti ------------------------------------------------------------------------------------ -- isPositiveInteger -- -- This function returns true if the given value is a positive integer, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a given table key is in the array part or the -- hash part of a table. ------------------------------------------------------------------------------------ function p.isPositiveInteger(v) return type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity end ------------------------------------------------------------------------------------ -- isNan -- -- This function returns true if the given number is a NaN value, and false if -- not. Although it doesn't operate on tables, it is included here as it is useful -- for determining whether a value can be a valid table key. Lua will generate an -- error if a NaN is used as a table key. ------------------------------------------------------------------------------------ function p.isNan(v) return type(v) == 'number' and v ~= v end ------------------------------------------------------------------------------------ -- shallowClone -- -- This returns a clone of a table. The value returned is a new table, but all -- subtables and functions are shared. Metamethods are respected, but the returned -- table will have no metatable of its own. ------------------------------------------------------------------------------------ function p.shallowClone(t) checkType('shallowClone', 1, t, 'table') local ret = {} for k, v in pairs(t) do ret[k] = v end return ret end ------------------------------------------------------------------------------------ -- removeDuplicates -- -- This removes duplicate values from an array. Non-positive-integer keys are -- ignored. The earliest value is kept, and all subsequent duplicate values are -- removed, but otherwise the array order is unchanged. ------------------------------------------------------------------------------------ function p.removeDuplicates(arr) checkType('removeDuplicates', 1, arr, 'table') local isNan = p.isNan local ret, exists = {}, {} for _, v in ipairs(arr) do if isNan(v) then -- NaNs can't be table keys, and they are also unique, so we don't need to check existence. ret[#ret + 1] = v else if not exists[v] then ret[#ret + 1] = v exists[v] = true end end end return ret end ------------------------------------------------------------------------------------ -- numKeys -- -- This takes a table and returns an array containing the numbers of any numerical -- keys that have non-nil values, sorted in numerical order. ------------------------------------------------------------------------------------ function p.numKeys(t) checkType('numKeys', 1, t, 'table') local isPositiveInteger = p.isPositiveInteger local nums = {} for k in pairs(t) do if isPositiveInteger(k) then nums[#nums + 1] = k end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- affixNums -- -- This takes a table and returns an array containing the numbers of keys with the -- specified prefix and suffix. For example, for the table -- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will return -- {1, 3, 6}. ------------------------------------------------------------------------------------ function p.affixNums(t, prefix, suffix) checkType('affixNums', 1, t, 'table') checkType('affixNums', 2, prefix, 'string', true) checkType('affixNums', 3, suffix, 'string', true) local function cleanPattern(s) -- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally. return s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1') end prefix = prefix or '' suffix = suffix or '' prefix = cleanPattern(prefix) suffix = cleanPattern(suffix) local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' local nums = {} for k in pairs(t) do if type(k) == 'string' then local num = mw.ustring.match(k, pattern) if num then nums[#nums + 1] = tonumber(num) end end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- numData -- -- Given a table with keys like {"foo1", "bar1", "foo2", "baz2"}, returns a table -- of subtables in the format -- {[1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'}}. -- Keys that don't end with an integer are stored in a subtable named "other". The -- compress option compresses the table so that it can be iterated over with -- ipairs. ------------------------------------------------------------------------------------ function p.numData(t, compress) checkType('numData', 1, t, 'table') checkType('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs(t) do local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$') if num then num = tonumber(num) local subtable = ret[num] or {} if prefix == '' then -- Positional parameters match the blank string; put them at the start of the subtable instead. prefix = 1 end subtable[prefix] = v ret[num] = subtable else local subtable = ret.other or {} subtable[k] = v ret.other = subtable end end if compress then local other = ret.other ret = p.compressSparseArray(ret) ret.other = other end return ret end ------------------------------------------------------------------------------------ -- compressSparseArray -- -- This takes an array with one or more nil values, and removes the nil values -- while preserving the order, so that the array can be safely traversed with -- ipairs. ------------------------------------------------------------------------------------ function p.compressSparseArray(t) checkType('compressSparseArray', 1, t, 'table') local ret = {} local nums = p.numKeys(t) for _, num in ipairs(nums) do ret[#ret + 1] = t[num] end return ret end ------------------------------------------------------------------------------------ -- sparseIpairs -- -- This is an iterator for sparse arrays. It can be used like ipairs, but can -- handle nil values. ------------------------------------------------------------------------------------ function p.sparseIpairs(t) checkType('sparseIpairs', 1, t, 'table') local nums = p.numKeys(t) local i = 0 local lim = #nums return function () i = i + 1 if i <= lim then local key = nums[i] return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- size -- -- This returns the size of a key/value pair table. It will also work on arrays, -- but for arrays it is more efficient to use the # operator. ------------------------------------------------------------------------------------ function p.size(t) checkType('size', 1, t, 'table') local i = 0 for _ in pairs(t) do i = i + 1 end return i end local function defaultKeySort(item1, item2) -- "number" < "string", so numbers will be sorted before strings. local type1, type2 = type(item1), type(item2) if type1 ~= type2 then return type1 < type2 elseif type1 == 'table' or type1 == 'boolean' or type1 == 'function' then return tostring(item1) < tostring(item2) else return item1 < item2 end end ------------------------------------------------------------------------------------ -- keysToList -- -- Returns an array of the keys in a table, sorted using either a default -- comparison function or a custom keySort function. ------------------------------------------------------------------------------------ function p.keysToList(t, keySort, checked) if not checked then checkType('keysToList', 1, t, 'table') checkTypeMulti('keysToList', 2, keySort, {'function', 'boolean', 'nil'}) end local arr = {} local index = 1 for k in pairs(t) do arr[index] = k index = index + 1 end if keySort ~= false then keySort = type(keySort) == 'function' and keySort or defaultKeySort table.sort(arr, keySort) end return arr end ------------------------------------------------------------------------------------ -- sortedPairs -- -- Iterates through a table, with the keys sorted using the keysToList function. -- If there are only numerical keys, sparseIpairs is probably more efficient. ------------------------------------------------------------------------------------ function p.sortedPairs(t, keySort) checkType('sortedPairs', 1, t, 'table') checkType('sortedPairs', 2, keySort, 'function', true) local arr = p.keysToList(t, keySort, true) local i = 0 return function () i = i + 1 local key = arr[i] if key ~= nil then return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- isArray -- -- Returns true if the given value is a table and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArray(v) if type(v) ~= 'table' then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- isArrayLike -- -- Returns true if the given value is iterable and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArrayLike(v) if not pcall(pairs, v) then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- invert -- -- Transposes the keys and values in an array. For example, {"a", "b", "c"} -> -- {a = 1, b = 2, c = 3}. Duplicates are not supported (result values refer to -- the index of the last duplicate) and NaN values are ignored. ------------------------------------------------------------------------------------ function p.invert(arr) checkType("invert", 1, arr, "table") local isNan = p.isNan local map = {} for i, v in ipairs(arr) do if not isNan(v) then map[v] = i end end return map end ------------------------------------------------------------------------------------ -- listToSet -- -- Creates a set from the array part of the table. Indexing the set by any of the -- values of the array returns true. For example, {"a", "b", "c"} -> -- {a = true, b = true, c = true}. NaN values are ignored as Lua considers them -- never equal to any value (including other NaNs or even themselves). ------------------------------------------------------------------------------------ function p.listToSet(arr) checkType("listToSet", 1, arr, "table") local isNan = p.isNan local set = {} for _, v in ipairs(arr) do if not isNan(v) then set[v] = true end end return set end ------------------------------------------------------------------------------------ -- deepCopy -- -- Recursive deep copy function. Preserves identities of subtables. ------------------------------------------------------------------------------------ local function _deepCopy(orig, includeMetatable, already_seen) -- Stores copies of tables indexed by the original table. already_seen = already_seen or {} local copy = already_seen[orig] if copy ~= nil then return copy end if type(orig) == 'table' then copy = {} for orig_key, orig_value in pairs(orig) do copy[_deepCopy(orig_key, includeMetatable, already_seen)] = _deepCopy(orig_value, includeMetatable, already_seen) end already_seen[orig] = copy if includeMetatable then local mt = getmetatable(orig) if mt ~= nil then local mt_copy = _deepCopy(mt, includeMetatable, already_seen) setmetatable(copy, mt_copy) already_seen[mt] = mt_copy end end else -- number, string, boolean, etc copy = orig end return copy end function p.deepCopy(orig, noMetatable, already_seen) checkType("deepCopy", 3, already_seen, "table", true) return _deepCopy(orig, not noMetatable, already_seen) end ------------------------------------------------------------------------------------ -- sparseConcat -- -- Concatenates all values in the table that are indexed by a number, in order. -- sparseConcat{a, nil, c, d} => "acd" -- sparseConcat{nil, b, c, d} => "bcd" ------------------------------------------------------------------------------------ function p.sparseConcat(t, sep, i, j) local arr = {} local arr_i = 0 for _, v in p.sparseIpairs(t) do arr_i = arr_i + 1 arr[arr_i] = v end return table.concat(arr, sep, i, j) end ------------------------------------------------------------------------------------ -- length -- -- Finds the length of an array, or of a quasi-array with keys such as "data1", -- "data2", etc., using an exponential search algorithm. It is similar to the -- operator #, but may return a different value when there are gaps in the array -- portion of the table. Intended to be used on data loaded with mw.loadData. For -- other tables, use #. -- Note: #frame.args in frame object always be set to 0, regardless of the number -- of unnamed template parameters, so use this function for frame.args. ------------------------------------------------------------------------------------ function p.length(t, prefix) -- requiring module inline so that [[Module:Exponential search]] which is -- only needed by this one function doesn't get millions of transclusions local expSearch = require("Module:Exponential search") checkType('length', 1, t, 'table') checkType('length', 2, prefix, 'string', true) return expSearch(function (i) local key if prefix then key = prefix .. tostring(i) else key = i end return t[key] ~= nil end) or 0 end ------------------------------------------------------------------------------------ -- inArray -- -- Returns true if valueToFind is a member of the array, and false otherwise. ------------------------------------------------------------------------------------ function p.inArray(arr, valueToFind) checkType("inArray", 1, arr, "table") -- if valueToFind is nil, error? for _, v in ipairs(arr) do if v == valueToFind then return true end end return false end return p 085e7094ac84eb0132ee65822cf3f69cd8ba3d81 Module:Yesno 828 63 122 121 2022-07-12T15:20:12Z 17ademoladav 2 1 revision imported Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end f767643e7d12126d020d88d662a3dd057817b9dc Home 0 1 123 1 2022-07-12T15:33:53Z 17ademoladav 2 Replaced content with "[[File:Librarylogo.png|180x180px|center]] <center><big><big><b> Welcome to the League of Servers World Assembly Library </b></big></big></center>" wikitext text/x-wiki [[File:Librarylogo.png|180x180px|center]] <center><big><big><b> Welcome to the League of Servers World Assembly Library </b></big></big></center> d5a958e2a8c5f33b4d50c9f66934d46800cc7954 127 123 2022-07-12T18:26:00Z 17ademoladav 2 wikitext text/x-wiki [[File:Librarylogo.png|180x180px|center]] <center><big><big><b> Welcome to the League of Servers World Assembly Library </b></big></big></center> '''<big><big>[[World Assembly Resolutions]]</big></big>''' '''<big><big>[[World Assembly Proclamations]]</big></big>''' 6e9c1a1af95db59fb05df134a53086193c1cc346 131 127 2022-07-12T23:56:58Z 17ademoladav 2 Protected "[[Main Page]]" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) wikitext text/x-wiki [[File:Librarylogo.png|180x180px|center]] <center><big><big><b> Welcome to the League of Servers World Assembly Library </b></big></big></center> '''<big><big>[[World Assembly Resolutions]]</big></big>''' '''<big><big>[[World Assembly Proclamations]]</big></big>''' 6e9c1a1af95db59fb05df134a53086193c1cc346 134 131 2022-07-13T09:18:47Z 17ademoladav 2 wikitext text/x-wiki [[File:Librarylogo.png|180x180px|center]] <center><big><big><b> Welcome to the League of Servers World Assembly Library </b></big></big></center> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' 207e24c0f0ba3b3d6b7641dd1be2087923e62924 136 134 2022-07-13T09:28:48Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers World Assembly Library </b></big></big></center> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' 8cb8668a5386737e72183f96e11f83e5f63cad35 World Assembly 0 64 124 2022-07-12T15:34:37Z 17ademoladav 2 Created page with "Work in Progress" wikitext text/x-wiki Work in Progress ecf791e428aebe09c0d1c60ff0c0b276832d28df 128 124 2022-07-12T18:55:06Z 17ademoladav 2 wikitext text/x-wiki {| class="wikitable" |+ Resolutions of the World Assembly as of 2022 |- ! Resolution !! Status |- | [[Resolution #0001]] || Passed |- | [[Resolution #0002]] || Passed |- | [[Resolution #0003]] || Passed |- | [[Resolution #0004]] || Pending |- | [[Resolution #0005]] || Pending |- | [[Resolution #0006]] || Pending |- | [[Resolution #0007]] || Pending |} 52107ad43b73522bacdb1a38d068c2a85734bcdd 130 128 2022-07-12T19:15:28Z 17ademoladav 2 wikitext text/x-wiki {| class="wikitable" |+ Resolutions of the World Assembly as of 2022 |- ! Resolution !! Status |- | [[Resolution 0001]] || Passed |- | [[Resolution 0002]] || Passed |- | [[Resolution 0003]] || Passed |- | [[Resolution 0004]] || Pending |- | [[Resolution 0005]] || Pending |- | [[Resolution 0006]] || Pending |- | [[Resolution 0007]] || Pending |} 3b74ba2d01962c23cbb2f61b560475dfa65392b0 165 130 2022-07-13T16:39:10Z 17ademoladav 2 wikitext text/x-wiki {| class="wikitable" |+ Resolutions of the World Assembly as of 2022 |- ! Resolution !! Status |- | [[Resolution 0001]] || In Effect |- | [[Resolution 0002]] || In Effect |- | [[Resolution 0003]] || In Effect |- | [[Resolution 0004]] || Pending |- | [[Resolution 0005]] || Pending |- | [[Resolution 0006]] || Pending |- | [[Resolution 0007]] || Pending |} f9bfb6e0dcda8a3bdc078a28c0d0695d7c04778c World Assembly Proclamations 0 65 125 2022-07-12T15:36:46Z 17ademoladav 2 Created page with "Work In Porgress" wikitext text/x-wiki Work In Porgress 21c281235421d7e67bf42cf204d6f35bad9dbe34 Court of Justice Documents 0 66 126 2022-07-12T15:37:28Z 17ademoladav 2 Created page with "Work In Progress" wikitext text/x-wiki Work In Progress 25b4dd6278802d62de32d2537064bfe03b3c2300 Template:Center 10 6 316 8 2022-07-12T20:52:13Z wikipedia>Izno 0 sigh wikitext text/x-wiki <includeonly><div class="center" style="width:auto; margin-left:auto; margin-right:auto;{{#if: {{{style|}}} | {{{style}}};}}">{{{1|[[Category:Pages using center with no arguments]]}}}</div></includeonly><noinclude> {{documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 1bcdac1c025611248a10a1f17cdfdedcc3b1d6c1 Template:Documentation 10 11 173 18 2022-07-13T04:50:28Z en>Waffledogefern 0 1 revision imported: Adding template for election results wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> <!-- Add categories to the /doc subpage --> </noinclude> 9e62b964e96c4e3d478edecbfcb3c0338ae8a276 140 18 2022-07-13T10:30:44Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> <!-- Add categories to the /doc subpage --> </noinclude> 9e62b964e96c4e3d478edecbfcb3c0338ae8a276 174 140 2022-07-19T20:31:01Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> <!-- Add categories to the /doc subpage --> </noinclude> 9e62b964e96c4e3d478edecbfcb3c0338ae8a276 Module:Documentation 828 43 177 82 2022-07-13T04:50:38Z en>Waffledogefern 0 1 revision imported: Adding template for election results Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return '<span class="' .. message('toolbar-class') .. '">(' .. table.concat(ret, ' &#124; ') .. ')</span>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :tag('div') -- 'documentation-container' :addClass(message('container')) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :done() -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.docTitle() local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else return '' end return mw.title.new(docpage) end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end return env end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) env = env or p.getEnvironment(args) local links local content = args.content -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxData(args, env, links) local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end return data end function p.renderStartBox(data) local sbox = mw.html.create('div') sbox :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content return '\n' .. (content or '') .. '\n' end return p f5e6c26ba2c8f3f4c760e20bf57d12ff6b95e367 148 82 2022-07-13T10:30:47Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return '<span class="' .. message('toolbar-class') .. '">(' .. table.concat(ret, ' &#124; ') .. ')</span>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.fullUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[Image:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') else pagetype = message('sandbox-notice-pagetype-other') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(message('sandbox-category')) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end local data = {} data.title = title data.docTitle = docTitle -- View, display, edit, and purge links if /doc exists. data.viewLinkDisplay = message('view-link-display') data.editLinkDisplay = message('edit-link-display') data.historyLinkDisplay = message('history-link-display') data.purgeLinkDisplay = message('purge-link-display') -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end data.preload = preload data.createLinkDisplay = message('create-link-display') return data end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local function escapeBrackets(s) -- Escapes square brackets with HTML entities. s = s:gsub('%[', '&#91;') -- Replace square brackets with HTML entities. s = s:gsub('%]', '&#93;') return s end local ret local docTitle = data.docTitle local title = data.title local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay) local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay) ret = '[%s] [%s] [%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink) else local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) ret = '[%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, createLink, purgeLink) end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editUrl = docTitle:fullUrl{action = 'edit'} local editDisplay = message('edit-link-display') local editLink = makeUrlLink(editUrl, editDisplay) local historyUrl = docTitle:fullUrl{action = 'history'} local historyDisplay = message('history-link-display') local historyLink = makeUrlLink(historyUrl, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'} local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p 95ab9de543475e37250dc94558a5508a3c7c3dfc 178 148 2022-07-19T20:31:02Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return '<span class="' .. message('toolbar-class') .. '">(' .. table.concat(ret, ' &#124; ') .. ')</span>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.fullUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[Image:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') else pagetype = message('sandbox-notice-pagetype-other') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(message('sandbox-category')) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end local data = {} data.title = title data.docTitle = docTitle -- View, display, edit, and purge links if /doc exists. data.viewLinkDisplay = message('view-link-display') data.editLinkDisplay = message('edit-link-display') data.historyLinkDisplay = message('history-link-display') data.purgeLinkDisplay = message('purge-link-display') -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end data.preload = preload data.createLinkDisplay = message('create-link-display') return data end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local function escapeBrackets(s) -- Escapes square brackets with HTML entities. s = s:gsub('%[', '&#91;') -- Replace square brackets with HTML entities. s = s:gsub('%]', '&#93;') return s end local ret local docTitle = data.docTitle local title = data.title local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay) local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay) ret = '[%s] [%s] [%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink) else local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) ret = '[%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, createLink, purgeLink) end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editUrl = docTitle:fullUrl{action = 'edit'} local editDisplay = message('edit-link-display') local editLink = makeUrlLink(editUrl, editDisplay) local historyUrl = docTitle:fullUrl{action = 'history'} local historyDisplay = message('history-link-display') local historyLink = makeUrlLink(historyUrl, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'} local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p 95ab9de543475e37250dc94558a5508a3c7c3dfc Module:Documentation/config 828 44 179 84 2022-07-13T04:50:38Z en>Waffledogefern 0 1 revision imported: Adding template for election results Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 072ab06361c6784553b53c7db51d2bf132ba2fcb 150 84 2022-07-13T10:30:48Z 17ademoladav 2 1 revision imported Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[File:Sandbox.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] -- A category to add to all template sandboxes. cfg['sandbox-category'] = 'Template sandboxes' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 71b68ed73088f1a59d61acf06bbee9fde6677f03 180 150 2022-07-19T20:31:03Z 17ademoladav 2 1 revision imported Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[File:Sandbox.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] -- A category to add to all template sandboxes. cfg['sandbox-category'] = 'Template sandboxes' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 71b68ed73088f1a59d61acf06bbee9fde6677f03 File:Logo.png 6 68 135 2022-07-13T09:27:24Z 17ademoladav 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Template:Font color 10 69 138 137 2022-07-13T10:30:43Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{ {{{|safesubst:}}}#if: {{{text|{{{3|}}}}}} | {{ {{{|safesubst:}}}#if: {{{link|}}} | {{ {{{|safesubst:}}}#ifeq: {{{link|}}} | yes | [[ {{ {{{|safesubst:}}}trim | {{{text|{{{3|}}}}}} }}|<span style="background-color:{{ {{{|safesubst:}}}trim | {{{bg|{{{2|inherit}}}}}} }}; color:{{ {{{|safesubst:}}}trim | {{{fg|{{{1|inherit}}}}}} }};">{{ {{{|safesubst:}}}trim | {{{text|{{{3|}}}}}} }}</span>]] | [[{{{link|}}}|<span style="background-color:{{ {{{|safesubst:}}}trim | {{{bg|{{{2|inherit}}}}}} }}; color:{{ {{{|safesubst:}}}trim | {{{fg|{{{1|inherit}}}}}} }};">{{ {{{|safesubst:}}}trim | {{{text|{{{3|}}}}}} }}</span>]] }} | <span style="background-color:{{ {{{|safesubst:}}}trim | {{{bg|{{{2|inherit}}}}}} }}; color:{{ {{{|safesubst:}}}trim | {{{fg|{{{1|inherit}}}}}} }};">{{ {{{|safesubst:}}}trim | {{{text|{{{3|}}}}}} }}</span> }} | {{ {{{|safesubst:}}}#if: {{{link|}}} | {{ {{{|safesubst:}}}#ifeq: {{{link|}}} | yes | [[ {{ {{{|safesubst:}}}trim | {{{bg|{{{2|}}}}}} }} |<span style="color:{{ {{{|safesubst:}}}trim | {{{fg|{{{1|inherit}}}}}} }};">{{ {{{|safesubst:}}}trim | {{{bg|{{{2|}}}}}} }}</span>]] | [[ {{ {{{|safesubst:}}}trim | {{{link|}}} }} |<span style="color:{{ {{{|safesubst:}}}trim | {{{fg|{{{1|inherit}}}}}} }};">{{ {{{|safesubst:}}}trim | {{{bg|{{{2|}}}}}} }}</span>]] }} | <span style="color:{{ {{{|safesubst:}}}trim | {{{fg|{{{1|inherit}}}}}} }};">{{ {{{|safesubst:}}}trim | {{{bg|{{{2|}}}}}} }}</span> }} }}<noinclude> {{documentation}} </noinclude> ee87b9a393f913af47715c9e9772c330125d308b Template:Font color/doc 10 70 142 141 2022-07-13T10:30:45Z 17ademoladav 2 1 revision imported wikitext text/x-wiki This is the {{[[Template:Font color|font color]]}} template. == Example == For example, <code><nowiki>{{font color|orange|This is a message.}}</nowiki></code> makes this:<br> {{font color|orange|This is a message.}} f9705e846565d35f0c9cdae76634b19d378fab5c Template:Trim 10 71 144 143 2022-07-13T10:30:46Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly>{{ {{{|safesubst:}}}#if:1|{{{x|{{{1|}}}}}}}}</includeonly><noinclude> {{Documentation}} </noinclude> 93c34a8e6f43c0598a6e878ed80599647730ace9 Module:Arguments 828 40 146 76 2022-07-13T10:30:47Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 176 146 2022-07-19T20:31:02Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Module:Message box 828 55 152 106 2022-07-13T10:30:49Z 17ademoladav 2 1 revision imported Scribunto text/plain require('Module:No globals') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage or 'Imbox notice.png', imageSize) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) fd6a8b1a0ac5916465cdf2eb099825f1d006cfba Module:Message box/configuration 828 56 154 108 2022-07-13T10:30:50Z 17ademoladav 2 1 revision imported Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '<small>[[Help:Maintenance template removal|Learn how and when to remove this template message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css' }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false, templatestyles = 'Module:Message box/fmbox.css' }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox license.png' -- @todo We need an SVG version of this }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg' }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css' }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } b6f0151037e6867b577c8cca32ff297e48697a10 Module:No globals 828 57 156 110 2022-07-13T10:30:51Z 17ademoladav 2 1 revision imported Scribunto text/plain local mt = getmetatable(_G) or {} function mt.__index (t, k) if k ~= 'arg' then error('Tried to read nil global ' .. tostring(k), 2) end return nil end function mt.__newindex(t, k, v) if k ~= 'arg' then error('Tried to write global ' .. tostring(k), 2) end rawset(t, k, v) end setmetatable(_G, mt) 8ce3969f7d53b08bd00dabe4cc9780bc6afd412a Module:Yesno 828 63 158 122 2022-07-13T10:30:51Z 17ademoladav 2 1 revision imported Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end f767643e7d12126d020d88d662a3dd057817b9dc WA Resolution 0001 (2022) 0 72 159 2022-07-13T10:30:56Z 17ademoladav 2 Created page with "== Resolution Information == Title: Citation: Authored by: Votes For: Votes Against: Votes Abstaining: Status: [color=green] In Effect [/color>]" wikitext text/x-wiki == Resolution Information == Title: Citation: Authored by: Votes For: Votes Against: Votes Abstaining: Status: [color=green] In Effect [/color>] 090505172dea82b5af7c8e899a2124994d913787 160 159 2022-07-13T10:31:29Z 17ademoladav 2 /* Resolution Information */ wikitext text/x-wiki == Resolution Information == Title: Citation: Authored by: Votes For: Votes Against: Votes Abstaining: Status: {{font color|green|In Effect}} 8fd1d856a21f93c9cf9fd15b00009251ec34abc2 161 160 2022-07-13T10:34:45Z 17ademoladav 2 wikitext text/x-wiki == Resolution Information == Title: Activity, Economy Changes and Events Citation: LOS/WA/RES/001 Authored by: World Assembly President Furnovsky Votes For: 17 Votes Against: 0 Status: {{font color|green|In Effect}} == Text == The World Assembly, including the President, the Vice Presidents and all delegates, ''Realizing'' that the League of Servers became very inactive, ''Hereby enacts the followings: '' '''Establishment''' of a new Lottery employment, '''Establishment''' of new Lottery roles for employees, '''Modifying''' current ways and establishing new ways to collect League Credits, '''Modifying''' current prices on current products which can be bought with League Credits, '''Making''' new products which can be bought with League Credits, '''Making''' League Credits exchangable to all member-servers’ own currency (system will be finished later) And stays resolved on the same. 707406e96eb9296cbb7d1d0c3a55c9eb2f0f8d87 162 161 2022-07-13T10:35:32Z 17ademoladav 2 wikitext text/x-wiki == Resolution Information == Title: Activity, Economy Changes and Events Citation: LOS/WA/RES/001 Authored by: World Assembly President Furnovsky Votes For: 17 Votes Against: 0 Status: {{font color|green|In Effect}} == Text == The World Assembly, including the President, the Vice Presidents and all delegates, ''Realizing'' that the League of Servers became very inactive, ''Hereby enacts the followings:'' '''Establishment''' of a new Lottery employment, '''Establishment''' of new Lottery roles for employees, '''Modifying''' current ways and establishing new ways to collect League Credits, '''Modifying''' current prices on current products which can be bought with League Credits, '''Making''' new products which can be bought with League Credits, '''Making''' League Credits exchangable to all member-servers’ own currency (system will be finished later) And stays resolved on the same. b85a28717083451c120d361b57bba1ab6b817d86 WA Resolution 0002 (2022) 0 73 163 2022-07-13T12:19:01Z 17ademoladav 2 Created page with "== Resolution Information == Title: The Right to Inspection Citation: LOS/WA/RES/002 Authored by: World Assembly Vice President Colin Anderson Votes For: 25 Votes Against: 10 Votes Abstaining: 3 Status: In Effect == Text == The World Assembly, ''Recognizing'' that the threat of innactive servers preventing the entry and inclusion of active and dynamic nations from joining the League, hereby enacts the following: The Establishment of the Activity Committee of t..." wikitext text/x-wiki == Resolution Information == Title: The Right to Inspection Citation: LOS/WA/RES/002 Authored by: World Assembly Vice President Colin Anderson Votes For: 25 Votes Against: 10 Votes Abstaining: 3 Status: In Effect == Text == The World Assembly, ''Recognizing'' that the threat of innactive servers preventing the entry and inclusion of active and dynamic nations from joining the League, hereby enacts the following: The Establishment of the Activity Committee of the World Assembly, to be overseen by the President and the Inspector General, and with the purpose of visiting and confirming the activity of all servers of the League; If requested, all servers must welcome a designated member of the Commitee so that they may certify the activity and compliance with the League standards within the Community; Members of the Committee must be Delegates from Servers which were certified as active in the past six (6) months; Servers that don’t comply with the League standards or refuse to welcome a member of the Activity Committee are to be given three (3) days to enact the necessary changes. If such doesn’t happen, the Server will be given one (1) week to change its policy, in which time they will be considered “on Probation”; Servers “on Probation” do not have voting rights nor can run for office in the League. If they are members of a Committee, their membership will be suspended. The Server reserves the right to call for the help of the Plead to Defend signatary Servers and issue emergency reports; If no change in policy is taken by a Server “on Probation” after the designated time, the Security Council may take a vote to expell the Server from the League. And stays resolved on the same. 48db94e791ea10dbf8cde2689ea1e29a08952664 164 163 2022-07-13T12:20:52Z 17ademoladav 2 /* Resolution Information */ wikitext text/x-wiki == Resolution Information == Title: The Right to Inspection Citation: LOS/WA/RES/002 Authored by: World Assembly Vice President Colin Anderson Votes For: 25 Votes Against: 10 Votes Abstaining: 3 Status: {{font color|green|In Effect}} == Text == The World Assembly, ''Recognizing'' that the threat of innactive servers preventing the entry and inclusion of active and dynamic nations from joining the League, hereby enacts the following: The Establishment of the Activity Committee of the World Assembly, to be overseen by the President and the Inspector General, and with the purpose of visiting and confirming the activity of all servers of the League; If requested, all servers must welcome a designated member of the Commitee so that they may certify the activity and compliance with the League standards within the Community; Members of the Committee must be Delegates from Servers which were certified as active in the past six (6) months; Servers that don’t comply with the League standards or refuse to welcome a member of the Activity Committee are to be given three (3) days to enact the necessary changes. If such doesn’t happen, the Server will be given one (1) week to change its policy, in which time they will be considered “on Probation”; Servers “on Probation” do not have voting rights nor can run for office in the League. If they are members of a Committee, their membership will be suspended. The Server reserves the right to call for the help of the Plead to Defend signatary Servers and issue emergency reports; If no change in policy is taken by a Server “on Probation” after the designated time, the Security Council may take a vote to expell the Server from the League. And stays resolved on the same. 3b138cc6dbaff7829a7e105b3c341e1a4ecf4480 MediaWiki:Common.css 8 4 166 4 2022-07-19T20:26:08Z 17ademoladav 2 css text/css /* Reset italic styling set by user agent */ cite, dfn { font-style: inherit; } /* Straight quote marks for <q> */ q { quotes: '"' '"' "'" "'"; } /* Avoid collision of blockquote with floating elements by swapping margin and padding */ blockquote { overflow: hidden; margin: 1em 0; padding: 0 40px; } /* Consistent size for <small>, <sub> and <sup> */ small { font-size: 85%; } .mw-body-content sub, .mw-body-content sup, span.reference /* for Parsoid */ { font-size: 80%; } /* Same spacing for indented and unindented paragraphs on talk pages */ .ns-talk .mw-body-content dd { margin-top: 0.4em; margin-bottom: 0.4em; } /* Main page fixes */ #interwiki-completelist { font-weight: bold; } /* Reduce page jumps by hiding collapsed/dismissed content */ .client-js .mw-special-Watchlist #watchlist-message, .client-js .NavFrame.collapsed .NavContent, .client-js .collapsible:not( .mw-made-collapsible).collapsed > tbody > tr:not(:first-child) { display: none; } /* Adds padding above Watchlist announcements where new recentchanges/watchlist filters are enabled */ .mw-rcfilters-enabled .mw-specialpage-summary { margin-top: 1em; } /* Hide charinsert base for those not using the gadget */ #editpage-specialchars { display: none; } /* Highlight linked elements (such as clicked references) in blue */ body.action-info .mw-body-content :target, .citation:target { background-color: #def; /* Fallback */ background-color: rgba(0, 127, 255, 0.133); } /* Styling for citations. Breaks long urls, etc., rather than overflowing box */ .citation { word-wrap: break-word; } /* For linked citation numbers and document IDs, where the number need not be shown on a screen or a handheld, but should be included in the printed version */ @media screen, handheld { .citation .printonly { display: none; } } /* Make the list of references smaller */ /* Keep in sync with Template:Refbegin/styles.css */ ol.references, div.reflist { font-size: 90%; /* Default font-size */ margin-bottom: 0.5em; } div.reflist ol.references { font-size: 100%; /* Reset font-size when nested in div.reflist */ margin-bottom: 0; /* Avoid double margin when nested in div.reflist */ list-style-type: inherit; /* Enable custom list style types */ } /* Allow hidden ref errors to be shown by user CSS */ /* TemplateStyles */ span.brokenref { display: none; } /* Reset top margin for lists embedded in columns */ div.columns { margin-top: 0.3em; } div.columns dl, div.columns ol, div.columns ul { margin-top: 0; } /* Avoid elements breaking between columns */ .nocolbreak, div.columns li, div.columns dd { -webkit-column-break-inside: avoid; page-break-inside: avoid; break-inside: avoid-column; } /* Style for horizontal lists (separator following item). @source mediawiki.org/wiki/Snippets/Horizontal_lists @revision 8 (2016-05-21) @author [[User:Edokter]] */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { margin: 0; display: inline; } /* Display nested lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* Generate interpuncts */ .hlist dt:after { content: ": "; } /** * Note hlist style usage differd in * the Minerva skin. Remember .hlist is a class defined in core as well! Please check Minerva desktop (and Minerva.css) when changing * See https://phabricator.wikimedia.org/T213239 */ .hlist dd:after, .hlist li:after { content: " · "; font-weight: bold; } .hlist dd:last-child:after, .hlist dt:last-child:after, .hlist li:last-child:after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child:before, .hlist dd dt:first-child:before, .hlist dd li:first-child:before, .hlist dt dd:first-child:before, .hlist dt dt:first-child:before, .hlist dt li:first-child:before, .hlist li dd:first-child:before, .hlist li dt:first-child:before, .hlist li li:first-child:before { content: " ("; font-weight: normal; } .hlist dd dd:last-child:after, .hlist dd dt:last-child:after, .hlist dd li:last-child:after, .hlist dt dd:last-child:after, .hlist dt dt:last-child:after, .hlist dt li:last-child:after, .hlist li dd:last-child:after, .hlist li dt:last-child:after, .hlist li li:last-child:after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li:before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child:before, .hlist dt ol > li:first-child:before, .hlist li ol > li:first-child:before { content: " (" counter(listitem) "\a0"; } /* Unbulleted lists */ .plainlist ol, .plainlist ul { line-height: inherit; list-style: none none; margin: 0; } .plainlist ol li, .plainlist ul li { margin-bottom: 0; } /* Default style for navigation boxes */ .navbox { /* Navbox container style */ box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; clear: both; font-size: 88%; text-align: center; padding: 1px; margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */ } .navbox .navbox { margin-top: 0; /* No top margin for nested navboxes */ } .navbox + .navbox { margin-top: -1px; /* Single pixel border between adjacent navboxes */ } .navbox-inner, .navbox-subgroup { width: 100%; } .navbox-group, .navbox-title, .navbox-abovebelow { padding: 0.25em 1em; /* Title, group and above/below styles */ line-height: 1.5em; text-align: center; } th.navbox-group { /* Group style */ white-space: nowrap; /* @noflip */ text-align: right; } .navbox, .navbox-subgroup { background-color: #fdfdfd; /* Background color */ } .navbox-list { line-height: 1.5em; border-color: #fdfdfd; /* Must match background color */ } /* cell spacing for navbox cells */ tr + tr > .navbox-abovebelow, tr + tr > .navbox-group, tr + tr > .navbox-image, tr + tr > .navbox-list { /* Borders above 2nd, 3rd, etc. rows */ border-top: 2px solid #fdfdfd; /* Must match background color */ } .navbox th, .navbox-title { background-color: #ccccff; /* Level 1 color */ } .navbox-abovebelow, th.navbox-group, .navbox-subgroup .navbox-title { background-color: #ddddff; /* Level 2 color */ } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background-color: #e6e6ff; /* Level 3 color */ } .navbox-even { background-color: #f7f7f7; /* Even row striping */ } .navbox-odd { background-color: transparent; /* Odd row striping */ } .navbox .hlist td dl, .navbox .hlist td ol, .navbox .hlist td ul, .navbox td.hlist dl, .navbox td.hlist ol, .navbox td.hlist ul { padding: 0.125em 0; /* Adjust hlist padding in navboxes */ } /* Default styling for Navbar template */ .navbar { display: inline; font-size: 88%; font-weight: normal; } .navbar ul { display: inline-block; white-space: nowrap; } .mw-body-content .navbar ul { line-height: inherit; } .navbar li { word-spacing: -0.125em; } .navbar.mini li abbr[title] { font-variant: small-caps; border-bottom: none; text-decoration: none; cursor: inherit; } /* Navbar styling when nested in infobox and navbox */ .infobox .navbar { font-size: 100%; } .navbox .navbar { display: block; font-size: 100%; } .navbox-title .navbar { /* @noflip */ float: left; /* @noflip */ text-align: left; /* @noflip */ margin-right: 0.5em; } /* Styling for JQuery makeCollapsible, matching that of collapseButton */ .mw-parser-output .mw-collapsible-toggle { font-weight: normal; /* @noflip */ text-align: right; padding-right: 0.2em; padding-left: 0.2em; } .mw-collapsible-leftside-toggle .mw-collapsible-toggle { /* @noflip */ float: left; /* @noflip */ text-align: left; } /* Infobox template style */ .infobox { border: 1px solid #a2a9b1; border-spacing: 3px; background-color: #f8f9fa; color: black; /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; font-size: 88%; line-height: 1.5em; } .infobox caption { font-size: 125%; font-weight: bold; padding: 0.2em; text-align: center; } .infobox td, .infobox th { vertical-align: top; /* @noflip */ text-align: left; } .infobox.bordered { border-collapse: collapse; } .infobox.bordered td, .infobox.bordered th { border: 1px solid #a2a9b1; } .infobox.bordered .borderless td, .infobox.bordered .borderless th { border: 0; } .infobox.sisterproject { width: 20em; font-size: 90%; } .infobox.standard-talk { border: 1px solid #c0c090; background-color: #f8eaba; } .infobox.standard-talk.bordered td, .infobox.standard-talk.bordered th { border: 1px solid #c0c090; } /* styles for bordered infobox with merged rows */ .infobox.bordered .mergedtoprow td, .infobox.bordered .mergedtoprow th { border: 0; border-top: 1px solid #a2a9b1; /* @noflip */ border-right: 1px solid #a2a9b1; } .infobox.bordered .mergedrow td, .infobox.bordered .mergedrow th { border: 0; /* @noflip */ border-right: 1px solid #a2a9b1; } /* Styles for geography infoboxes, eg countries, country subdivisions, cities, etc. */ .infobox.geography { border-collapse: collapse; line-height: 1.2em; font-size: 90%; } .infobox.geography td, .infobox.geography th { border-top: 1px solid #a2a9b1; padding: 0.4em 0.6em 0.4em 0.6em; } .infobox.geography .mergedtoprow td, .infobox.geography .mergedtoprow th { border-top: 1px solid #a2a9b1; padding: 0.4em 0.6em 0.2em 0.6em; } .infobox.geography .mergedrow td, .infobox.geography .mergedrow th { border: 0; padding: 0 0.6em 0.2em 0.6em; } .infobox.geography .mergedbottomrow td, .infobox.geography .mergedbottomrow th { border-top: 0; border-bottom: 1px solid #a2a9b1; padding: 0 0.6em 0.4em 0.6em; } .infobox.geography .maptable td, .infobox.geography .maptable th { border: 0; padding: 0; } /* Normal font styling for wikitable row headers with scope="row" tag */ .wikitable.plainrowheaders th[scope=row] { font-weight: normal; /* @noflip */ text-align: left; } /* Lists in wikitable data cells are always left-aligned */ .wikitable td ul, .wikitable td ol, .wikitable td dl { /* @noflip */ text-align: left; } /* ...unless they also use the hlist class */ .toc.hlist ul, #toc.hlist ul, .wikitable.hlist td ul, .wikitable.hlist td ol, .wikitable.hlist td dl { text-align: inherit; } /* Icons for medialist templates [[Template:Listen]], [[Template:Multi-listen_start]], [[Template:Video]], [[Template:Multi-video_start]] */ /* TemplateStyles */ div.listenlist { background: url("//upload.wikimedia.org/wikipedia/commons/4/47/Sound-icon.svg") no-repeat scroll 0 0 transparent; background-size: 30px; padding-left: 40px; } /* Fix for hieroglyphs specificity issue in infoboxes ([[phab:T43869]]) */ table.mw-hiero-table td { vertical-align: middle; } /* Change the external link icon to an Adobe icon for all PDF files */ .mw-parser-output a[href$=".pdf"].external, .mw-parser-output a[href*=".pdf?"].external, .mw-parser-output a[href*=".pdf#"].external, .mw-parser-output a[href$=".PDF"].external, .mw-parser-output a[href*=".PDF?"].external, .mw-parser-output a[href*=".PDF#"].external { background: url("//upload.wikimedia.org/wikipedia/commons/2/23/Icons-mini-file_acrobat.gif") no-repeat right; /* @noflip */ padding-right: 18px; } /* Messagebox templates */ .messagebox { border: 1px solid #a2a9b1; background-color: #f8f9fa; width: 80%; margin: 0 auto 1em auto; padding: .2em; } .messagebox.merge { border: 1px solid #c0b8cc; background-color: #f0e5ff; text-align: center; } .messagebox.cleanup { border: 1px solid #9f9fff; background-color: #efefff; text-align: center; } .messagebox.standard-talk { border: 1px solid #c0c090; background-color: #f8eaba; margin: 4px auto; } /* For old WikiProject banners inside banner shells. */ .mbox-inside .standard-talk, .messagebox.nested-talk { border: 1px solid #c0c090; background-color: #f8eaba; width: 100%; margin: 2px 0; padding: 2px; } .messagebox.small { width: 238px; font-size: 85%; /* @noflip */ float: right; clear: both; /* @noflip */ margin: 0 0 1em 1em; line-height: 1.25em; } .messagebox.small-talk { width: 238px; font-size: 85%; /* @noflip */ float: right; clear: both; /* @noflip */ margin: 0 0 1em 1em; line-height: 1.25em; background-color: #f8eaba; } /* Cell sizes for ambox/tmbox/imbox/cmbox/ombox/fmbox/dmbox message boxes */ th.mbox-text, td.mbox-text { /* The message body cell(s) */ border: none; /* @noflip */ padding: 0.25em 0.9em; /* 0.9em left/right */ width: 100%; /* Make all mboxes the same width regardless of text length */ } td.mbox-image { /* The left image cell */ border: none; /* @noflip */ padding: 2px 0 2px 0.9em; /* 0.9em left, 0px right */ text-align: center; } td.mbox-imageright { /* The right image cell */ border: none; /* @noflip */ padding: 2px 0.9em 2px 0; /* 0px left, 0.9em right */ text-align: center; } td.mbox-empty-cell { /* An empty narrow cell */ border: none; padding: 0; width: 1px; } /* Article message box styles */ table.ambox { margin: 0 10%; /* 10% = Will not overlap with other elements */ border: 1px solid #a2a9b1; /* @noflip */ border-left: 10px solid #36c; /* Default "notice" blue */ background-color: #fbfbfb; box-sizing: border-box; } table.ambox + table.ambox { /* Single border between stacked boxes. */ margin-top: -1px; } .ambox th.mbox-text, .ambox td.mbox-text { /* The message body cell(s) */ padding: 0.25em 0.5em; /* 0.5em left/right */ } .ambox td.mbox-image { /* The left image cell */ /* @noflip */ padding: 2px 0 2px 0.5em; /* 0.5em left, 0px right */ } .ambox td.mbox-imageright { /* The right image cell */ /* @noflip */ padding: 2px 0.5em 2px 0; /* 0px left, 0.5em right */ } table.ambox-notice { /* @noflip */ border-left: 10px solid #36c; /* Blue */ } table.ambox-speedy { /* @noflip */ border-left: 10px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } table.ambox-delete { /* @noflip */ border-left: 10px solid #b32424; /* Red */ } table.ambox-content { /* @noflip */ border-left: 10px solid #f28500; /* Orange */ } table.ambox-style { /* @noflip */ border-left: 10px solid #fc3; /* Yellow */ } table.ambox-move { /* @noflip */ border-left: 10px solid #9932cc; /* Purple */ } table.ambox-protection { /* @noflip */ border-left: 10px solid #a2a9b1; /* Gray-gold */ } /* Image message box styles */ table.imbox { margin: 4px 10%; border-collapse: collapse; border: 3px solid #36c; /* Default "notice" blue */ background-color: #fbfbfb; box-sizing: border-box; } .imbox .mbox-text .imbox { /* For imboxes inside imbox-text cells. */ margin: 0 -0.5em; /* 0.9 - 0.5 = 0.4em left/right. */ display: block; /* Fix for webkit to force 100% width. */ } .mbox-inside .imbox { /* For imboxes inside other templates. */ margin: 4px; } table.imbox-notice { border: 3px solid #36c; /* Blue */ } table.imbox-speedy { border: 3px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } table.imbox-delete { border: 3px solid #b32424; /* Red */ } table.imbox-content { border: 3px solid #f28500; /* Orange */ } table.imbox-style { border: 3px solid #fc3; /* Yellow */ } table.imbox-move { border: 3px solid #9932cc; /* Purple */ } table.imbox-protection { border: 3px solid #a2a9b1; /* Gray-gold */ } table.imbox-license { border: 3px solid #88a; /* Dark gray */ background-color: #f7f8ff; /* Light gray */ } table.imbox-featured { border: 3px solid #cba135; /* Brown-gold */ } /* Category message box styles */ table.cmbox { margin: 3px 10%; border-collapse: collapse; border: 1px solid #a2a9b1; background-color: #dfe8ff; /* Default "notice" blue */ box-sizing: border-box; } table.cmbox-notice { background-color: #d8e8ff; /* Blue */ } table.cmbox-speedy { margin-top: 4px; margin-bottom: 4px; border: 4px solid #b32424; /* Red */ background-color: #ffdbdb; /* Pink */ } table.cmbox-delete { background-color: #ffdbdb; /* Pink */ } table.cmbox-content { background-color: #ffe7ce; /* Orange */ } table.cmbox-style { background-color: #fff9db; /* Yellow */ } table.cmbox-move { background-color: #e4d8ff; /* Purple */ } table.cmbox-protection { background-color: #efefe1; /* Gray-gold */ } /* Other pages message box styles */ table.ombox { margin: 4px 10%; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; } table.ombox-notice { border: 1px solid #a2a9b1; /* Gray */ } table.ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } table.ombox-delete { border: 2px solid #b32424; /* Red */ } table.ombox-content { border: 1px solid #f28500; /* Orange */ } table.ombox-style { border: 1px solid #fc3; /* Yellow */ } table.ombox-move { border: 1px solid #9932cc; /* Purple */ } table.ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } /* Talk page message box styles */ table.tmbox { margin: 4px 10%; border-collapse: collapse; border: 1px solid #c0c090; /* Default "notice" gray-brown */ background-color: #f8eaba; min-width: 80%; box-sizing: border-box; } .tmbox.mbox-small { min-width: 0; /* reset the min-width of tmbox above */ } .mediawiki .mbox-inside .tmbox { /* For tmboxes inside other templates. The "mediawiki" class ensures that */ margin: 2px 0; /* this declaration overrides other styles (including mbox-small above) */ width: 100%; /* For Safari and Opera */ } .mbox-inside .tmbox.mbox-small { /* "small" tmboxes should not be small when */ line-height: 1.5em; /* also "nested", so reset styles that are */ font-size: 100%; /* set in "mbox-small" above. */ } table.tmbox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } table.tmbox-delete { border: 2px solid #b32424; /* Red */ } table.tmbox-content { border: 2px solid #f28500; /* Orange */ } table.tmbox-style { border: 2px solid #fc3; /* Yellow */ } table.tmbox-move { border: 2px solid #9932cc; /* Purple */ } table.tmbox-protection, table.tmbox-notice { border: 1px solid #c0c090; /* Gray-brown */ } /* Footer and header message box styles */ table.fmbox { clear: both; margin: 0.2em 0; width: 100%; border: 1px solid #a2a9b1; background-color: #f8f9fa; /* Default "system" gray */ box-sizing: border-box; } table.fmbox-system { background-color: #f8f9fa; } table.fmbox-warning { border: 1px solid #bb7070; /* Dark pink */ background-color: #ffdbdb; /* Pink */ } table.fmbox-editnotice { background-color: transparent; } /* Div based "warning" style fmbox messages. */ div.mw-warning-with-logexcerpt, div.mw-lag-warn-high, div.mw-cascadeprotectedwarning, div#mw-protect-cascadeon, div.titleblacklist-warning, div.locked-warning { clear: both; margin: 0.2em 0; border: 1px solid #bb7070; background-color: #ffdbdb; padding: 0.25em 0.9em; box-sizing: border-box; } /* These mbox-small classes must be placed after all other ambox/tmbox/ombox etc classes. "html body.mediawiki" is so they override "table.ambox + table.ambox" above. */ html body.mediawiki .mbox-small { /* For the "small=yes" option. */ /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; box-sizing: border-box; width: 238px; font-size: 88%; line-height: 1.25em; } html body.mediawiki .mbox-small-left { /* For the "small=left" option. */ /* @noflip */ margin: 4px 1em 4px 0; box-sizing: border-box; overflow: hidden; width: 238px; border-collapse: collapse; font-size: 88%; line-height: 1.25em; } /* Style for compact ambox */ /* Hide the images */ .compact-ambox table .mbox-image, .compact-ambox table .mbox-imageright, .compact-ambox table .mbox-empty-cell { display: none; } /* Remove borders, backgrounds, padding, etc. */ .compact-ambox table.ambox { border: none; border-collapse: collapse; background-color: transparent; margin: 0 0 0 1.6em !important; padding: 0 !important; width: auto; display: block; } body.mediawiki .compact-ambox table.mbox-small-left { font-size: 100%; width: auto; margin: 0; } /* Style the text cell as a list item and remove its padding */ .compact-ambox table .mbox-text { padding: 0 !important; margin: 0 !important; } .compact-ambox table .mbox-text-span { display: list-item; line-height: 1.5em; list-style-type: square; list-style-image: url(/w/skins/MonoBook/resources/images/bullet.svg); } .skin-vector .compact-ambox table .mbox-text-span { list-style-type: disc; list-style-image: url(/w/skins/Vector/resources/skins.vector.styles/images/bullet-icon.svg); } /* Allow for hiding text in compact form */ .compact-ambox .hide-when-compact { display: none; } /* Hide (formatting) elements from screen, but not from screenreaders */ .visualhide { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; } /* Remove underlines from certain links */ .nounderlines a, .IPA a:link, .IPA a:visited { text-decoration: none !important; } /* Standard Navigationsleisten, aka box hiding thingy from .de. Documentation at [[Wikipedia:NavFrame]]. */ div.NavFrame { margin: 0; padding: 4px; border: 1px solid #a2a9b1; text-align: center; border-collapse: collapse; font-size: 95%; } div.NavFrame + div.NavFrame { border-top-style: none; border-top-style: hidden; } div.NavFrame div.NavHead { line-height: 1.6em; font-weight: bold; background-color: #ccf; position: relative; } div.NavFrame p, div.NavFrame div.NavContent, div.NavFrame div.NavContent p { font-size: 100%; } a.NavToggle { position: absolute; top: 0; /* @noflip */ right: 3px; font-weight: normal; font-size: 90%; } /* Hatnotes and disambiguation notices */ .hatnote { font-style: italic; } .hatnote i { font-style: normal; } div.hatnote { /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; } div.hatnote + div.hatnote { margin-top: -0.5em; } /* Allow transcluded pages to display in lists rather than a table. */ .listify td { display: list-item; } .listify tr { display: block; } .listify table { display: block; } /* Geographical coordinates defaults. See [[Template:Coord/link]] for how these are used. The classes "geo", "longitude", and "latitude" are used by the [[Geo microformat]]. */ /* TemplateStyles */ .geo-default, .geo-dms, .geo-dec { display: inline; } .geo-nondefault, .geo-multi-punct { display: none; } .longitude, .latitude { white-space: nowrap; } /* User block messages */ div.user-block { padding: 5px; margin-bottom: 0.5em; border: 1px solid #a9a9a9; background-color: #ffefd5; } /* Prevent line breaks in silly places: 1) Where desired 2) Links when we don't want them to 3) Bold "links" to the page itself */ .nowrap, .nowraplinks a, .nowraplinks .selflink { white-space: nowrap; } .nowrap pre { white-space: pre; } /* But allow wrapping where desired: */ .wrap, .wraplinks a { white-space: normal; } /* For template documentation */ /* TemplateStyles */ .template-documentation { clear: both; margin: 1em 0 0 0; border: 1px solid #a2a9b1; background-color: #ecfcf4; padding: 1em; } /* Increase the height of the image upload box */ #wpUploadDescription { height: 13em; } /* Minimum thumb width */ .thumbinner { min-width: 100px; } /* Prevent floating boxes from overlapping any category listings, file histories, edit previews, and edit [Show changes] views. */ #mw-subcategories, #mw-pages, #mw-category-media, #filehistory, #wikiPreview, #wikiDiff { clear: both; } /* Selectively hide headers in WikiProject banners */ /* TemplateStyles */ .wpb .wpb-header { display: none; } .wpbs-inner .wpb .wpb-header { display: block; /* for IE */ } .wpbs-inner .wpb .wpb-header { display: table-row; /* for real browsers */ } .wpbs-inner .wpb-outside { display: none; /* hide things that should only display outside shells */ } /* Styling for Abuse Filter tags */ .mw-tag-markers { font-style: italic; font-size: 90%; } /* Hide stuff meant for accounts with special permissions. Made visible again in [[MediaWiki:Group-checkuser.css]], [[MediaWiki:Group-sysop.css]], [[MediaWiki:Group-patroller.css]], [[MediaWiki:Group-templateeditor.css]], [[MediaWiki:Group-extendedmover.css]], [[MediaWiki:Group-extendedconfirmed.css]], and [[Mediawiki:Group-autoconfirmed.css]]. */ .checkuser-show, .sysop-show, .patroller-show, .templateeditor-show, .extendedmover-show, .extendedconfirmed-show, .autoconfirmed-show, .user-show { display: none; } /* Hide the redlink generated by {{Editnotice}}, this overrides the ".sysop-show { display: none; }" above that applies to the same link as well. See [[phab:T45013]] Hide the images in editnotices to keep them readable in VE view. Long term, editnotices should become a core feature so that they can be designed responsive. */ .ve-ui-mwNoticesPopupTool-item .editnotice-redlink, .ve-ui-mwNoticesPopupTool-item .mbox-image, .ve-ui-mwNoticesPopupTool-item .mbox-imageright { display: none !important; } /* Remove bullets when there are multiple edit page warnings */ ul.permissions-errors > li { list-style: none none; } ul.permissions-errors { margin: 0; } /* Generic class for Times-based serif, texhtml class for inline math */ .times-serif, span.texhtml { font-family: "Nimbus Roman No9 L", "Times New Roman", Times, serif; font-size: 118%; line-height: 1; } span.texhtml { white-space: nowrap; } span.texhtml span.texhtml { font-size: 100%; } span.mwe-math-mathml-inline { font-size: 118%; } /* Force tabular and lining display for digits and texhtml */ .digits, .texhtml { -moz-font-feature-settings: "lnum", "tnum", "kern" 0; -webkit-font-feature-settings: "lnum", "tnum", "kern" 0; font-feature-settings: "lnum", "tnum", "kern" 0; font-variant-numeric: lining-nums tabular-nums; font-kerning: none; } /* Make <math display="block"> be left aligned with one space indent for compatibility with style conventions */ .mwe-math-fallback-image-display, .mwe-math-mathml-display { margin-left: 1.6em !important; margin-top: 0.6em; margin-bottom: 0.6em; } .mwe-math-mathml-display math { display: inline; } /* Fix styling of transcluded prefindex tables */ table#mw-prefixindex-list-table, table#mw-prefixindex-nav-table { width: 98%; } /* Make it possible to hide checkboxes in <inputbox> */ .inputbox-hidecheckboxes form .inputbox-element, .inputbox-hidecheckboxes .mw-ui-checkbox { display: none !important; } /* Move 'play' button of video player to bottom left corner */ .PopUpMediaTransform a .play-btn-large { margin: 0; top: auto; right: auto; bottom: 0; left: 0; } /* Hide FlaggedRevs notice UI when there are no pending changes */ .flaggedrevs_draft_synced, .flaggedrevs_stable_synced { display: none; } /* Force imgs in galleries to have borders by wrapping them in class=bordered-images */ .bordered-images img { border: solid #ddd 1px; } /* Gallery styles background changes are restricted to screen view. In printing we should avoid applying backgrounds. */ @media screen { /* The backgrounds for galleries. */ #content .gallerybox div.thumb { /* Light gray padding */ background-color: #f8f9fa; } /* Put a chequered background behind images, only visible if they have transparency. '.filehistory a img' and '#file img:hover' are handled by MediaWiki core (as of 1.19) */ .gallerybox .thumb img { background: #fff url(//upload.wikimedia.org/wikipedia/commons/5/5d/Checker-16x16.png) repeat; } /* But not on articles, user pages, portals or with opt-out. */ .ns-0 .gallerybox .thumb img, .ns-2 .gallerybox .thumb img, .ns-100 .gallerybox .thumb img, .nochecker .gallerybox .thumb img { background-image: none; } } /* Tables of contents */ ul#filetoc, #toc, .toc, .mw-warning { display: inline-block; .box; padding: 1.25em 1.75em; margin: 1em 0 ; min-width: 15em; } ul#filetoc { display: block; border: none; } #toc ul, .toc ul { list-style: none; } #mw-content .toc h2 { font-size: 1.2em; font-family: @fonts; margin: 0; display: inline-block; border-bottom-color: @grey; } .toctoggle { color: @background3; } #toc li:last-child { margin-bottom: .5em; } .toclevel-1 { margin-bottom: .25em; } .mw-changeslist-legend, #mw-content .mw-search-profile-tabs, #mw-content fieldset#mw-searchoptions, table.wikitable { border: none; color: @text; .box; } #mw-content .mw-search-profile-tabs { padding: .5em; } table.wikitable > tr > th, table.wikitable > tr > td, table.wikitable > * > tr > th, table.wikitable > * > tr > td { border: 1px solid @grey-bright; padding: 0.5em; } table.wikitable > tr > th, table.wikitable > * > tr > th { border: 1px solid @grey-bright; } .mainpage_topbox { background: #f9f9f9; margin: 1em 0; } .mainpage_layouttable { border: 0; margin: 0; width: 100%; border-spacing: 10px; } .mainpage_layouttable * > tr > td { vertical-align: top; } .mainpage_boxtitle { font-size: 105%; padding: 0.4em; background-color: #eeeeee; font-weight: bold; min-height: 2em; vertical-align: middle; } .mainpage_pagetitle { font-size: 200%; padding: 0.2em 0.4em; } .mainpage_sitelinks { padding: 0.2em; text-align: center; background-color: white; font-weight: bold; } .mainpage_hubtitle { text-align: center; } .mainpage_boxcontents { background: #ffffff; padding: 0.2em 0.4em; } .mainpage_boxcontents_small { font-size: 95%; } .mainpage_boxcontents_title { display: block; border-bottom: 1px solid #AAA; margin-bottom: 0.5em; text-align: center; font-weight: bold; font-size: larger; } .mainpage_middleblock .mainpage_hubbox { width: 33%; } .mainpage_hubbox, .mainpage_topbox { padding: 0; border: 1px solid #aaaaaa; } .mainpage_newscell .mainpage_boxtitle { padding-right: 25px; } .mainpage_downloadcell .mainpage_boxtitle { padding-right: 25px; } .mainpage_opportunitiescell .mainpage_boxtitle { padding-right: 25px; } .mainpage_featuredpagescell .mainpage_boxtitle { padding-right: 25px; } .mainpage_mwtitle { color: #005288; } .mainpage_notice { background: #f9f9f9; border: 1px solid #aaaaaa; margin: 0.2em 10px 10px; padding:0.2em 0.4em; text-align: center; font-size: 125% } .mainpage_languages { margin: 0.5em 10px; } .mainpage_row2, .mainpage_row3 { /*display: -webkit-box;*/ /*display: -moz-box;*/ /*display: -ms-flexbox;*/ /*display: -webkit-flex;*/ display: flex; flex-flow: row wrap; justify-content: space-between; margin: 1em 0; } @media screen and (min-width: 45em) { .mainpage_row2 .mainpage_hubbox { box-sizing: border-box; float: left; width: 32%; } } @media screen and (max-width: 45em) { .mainpage_row2 .mainpage_hubbox { box-sizing: border-box; flex: 1 0 100%; width: 100%; margin: 0.5em 0 } } @media screen and (min-width: 45em) { .mainpage_row3 .mainpage_hubbox { box-sizing: border-box; float: left; } .mainpage_row3 .mainpage_downloadcell { flex: 1 2 15em; min-width: 10em; max-width: 20em; } .mainpage_row3 .mainpage_newscell { flex: 6 0 20em; margin: 0 1em; } .mainpage_row3 .mainpage_opportunitiescell { flex: 1 2 15em; min-width: 10em; max-width: 20em; } } @media screen and (max-width: 45em) { .mainpage_row3 .mainpage_hubbox { box-sizing: border-box; flex: 1 0 100%; width: 100%; margin: 0.5em 0; } } @media screen and (max-width: 55em) { .mainpage_row3 .mainpage_newscell { order: -1; flex: 1 0 100%; width: 100%; margin: 0 0 0.5em 0; } } /* When <div class="nonumtoc"> is used on the table of contents, the ToC will display without numbers */ .nonumtoc .tocnumber { display: none; } .nonumtoc #toc ul, .nonumtoc .toc ul { line-height: 1.5em; list-style: none none; margin: .3em 0 0; padding: 0; } .hlist.nonumtoc #toc ul ul, .hlist.nonumtoc .toc ul ul { /* @noflip */ margin: 0; } /* Allow limiting of which header levels are shown in a TOC; <div class="toclimit-3">, for instance, will limit to showing ==headings== and ===headings=== but no further (as long as there are no =headings= on the page, which there shouldn't be according to the MoS). */ .toclimit-2 .toclevel-1 ul, .toclimit-3 .toclevel-2 ul, .toclimit-4 .toclevel-3 ul, .toclimit-5 .toclevel-4 ul, .toclimit-6 .toclevel-5 ul, .toclimit-7 .toclevel-6 ul { display: none; } /* Custom ToC Numbering Style */ .tocnumber { display: none !important; } /* Styling for Template:Quote */ blockquote.templatequote div.templatequotecite { line-height: 1.5em; /* @noflip */ text-align: left; /* @noflip */ padding-left: 1.6em; margin-top: 0; li#ca-talk.new{ display:none!important; } #ca-talk { display: none !important; } } /* CUSTOM FONTS */ /* Define HARNDONIAN*/ @font-face { font-family: 'Harndonian'; src: url('../resources/Harndonian_V2.ttf') format('truetype'); } /* Create HARNDONIAN element*/ .Harndonian{ font-family: Harndonian; } /* Define KOIHO */ @font-face { font-family: 'Koiho'; src: url('../resources/koiho.ttf') format('truetype'); } /* Create KOIHO element*/ .Koiho{ font-family: Koiho; } 43fa46592010d81cb3bab20fc01cf1ac547fcb74 Template:Infobox 10 17 168 30 2022-07-19T20:30:58Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#invoke:Infobox|infobox}}<includeonly>{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Category:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}</includeonly><noinclude> {{documentation}} <!-- Categories go in the /doc subpage, and interwikis go in Wikidata. --> </noinclude> 817a9f5b6524eced06a57bd1d5fd7179f9369bf2 Template:Infobox legislation 10 5 170 6 2022-07-19T20:30:59Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{Infobox | child = {{{child|}}} | subbox = {{{subbox|}}} | above = {{{name|{{{short_title|<includeonly>{{PAGENAMEBASE}}</includeonly>}}}}}} | bodyclass = vcard | abovestyle = {{#if:{{{background_color|}}}|border-top: 2px solid {{{background_color}}}; border-bottom: 2px solid {{{background_color}}}|background-color: #ededed}} | headerstyle = {{#if:{{{background_color|}}}|border-top: 2px solid {{{background_color}}}; border-bottom: 2px solid {{{background_color}}}|background-color: #ededed}} |image = {{#invoke:InfoboxImage|InfoboxImage|image={{#if:{{{image|}}} |{{{image}}} |{{Infobox legislation/images |image={{if empty|{{{legislature|}}}|{{{enacted_by|}}}|{{{considered_by|}}}}} |date={{{date_enacted|}}} }} }}|size={{{imagesize|{{{image_size|}}}}}}|sizedefault=frameless|upright={{{upright|{{{image_upright|yes}}}}}}|alt={{{imagealt|}}}}} |caption = {{{caption|}}} | labelstyle = {{{labelstyle|}}} |header1 = {{if empty|{{{legislature|}}}|{{{enacted_by|}}}|{{{considered_by|}}}}} |data2 = {{Collapsible list |titlestyle=font-weight:normal;background:transparent;text-align:center; | title = '''[[Long title]]''' | {{#if: {{{long_title|}}} |{{center|{{{long_title}}} }} }} }} |label3 = Citation |data3 = {{{citation|}}} |label4 = Territorial extent |data4 = {{{territorial_extent|}}} |label5 = Considered&nbsp;by |data5 = {{{considered_by|}}} |label6 = Enacted&nbsp;by |data6 = {{{enacted_by|}}} |label7 = Passed |data7 = {{{date_passed|}}} |label8 = Enacted |data8 = {{{date_enacted|}}} |label9 = Considered&nbsp;by |data9 = {{{considered_by2|}}} |label10 = Enacted&nbsp;by |data10 = {{{enacted_by2|}}} |label11 = Passed |data11 = {{{date_passed2|}}} |label12 = Enacted |data12 = {{{date_enacted2|}}} |label13 = Assented&nbsp;by |data13 = {{{assented_by|}}} |label14 = Assented&nbsp;to |data14 = {{{date_assented|}}} |label15 = [[Royal assent]] |data15 = {{{royal_assent|}}} |label16 = Signed&nbsp;by |data16 = {{{signed_by|}}} |label17 = Signed |data17 = {{{date_signed|}}} |label18 = Vetoed&nbsp;by |data18 = {{{vetoed_by|}}} |label19 = Vetoed |data19 = {{{date_vetoed|}}} |label20 = Type&nbsp;of&nbsp;veto |data20 = {{{veto_type|}}} |label21 = Veto&nbsp;overridden |data21 = {{{veto_overridden|}}} |label22 = Holding |data22 = {{{reference_holding|}}} |label23 = [[Pocket veto|Pocket&nbsp;vetoed]] |data23 = {{{date_pocket_vetoed|}}} |label24 = Became law by inaction |data24 = {{{date_became_law_by_inaction|}}} |label25 = Commenced |data25 = {{{date_commenced|{{{commencement|}}}}}} |label26 = [[Effective date|Effective]] |data26 = {{{date_effective|}}} |label27 = Date&nbsp;of&nbsp;expiry |data27 = {{{date_of_expiry|}}} |label28 = Repealed |data28 = {{{date_repealed|}}} |label29 = Administered&nbsp;by |data29 = {{{administered_by|}}} |header30 = {{#if:{{{bill|}}}{{{bill_date|}}}{{{1st_reading|}}}{{{2nd_reading|}}}{{{3rd_reading|}}}|Legislative history}} |label31 = {{#if:{{{enacted_by2|{{{considered_by2|}}}}}}|[[Bill (proposed law)|Bill]] introduced in the {{{enacted_by|{{{considered_by}}}}}}|[[Bill (proposed law)|Bill]]}} |data31 = {{{bill|}}} |label32 = Bill citation |data32 = {{{bill_citation|}}} |label33 = Bill published on |data33 = {{{bill_date|}}} |label34 = Introduced by |data34 = {{{introduced_by|}}} |label35 = [[Reading (legislature)#First reading|First reading]] |data35 = {{{1st_reading|}}} |label36 = [[Reading (legislature)#Second reading|Second reading]] |data36 = {{{2nd_reading|}}} |label37 = {{{committee_whole_label|[[Committee of the whole]]}}} |data37 = {{{committee_whole|}}} |label38 = [[Reading (legislature)#Third reading|Third reading]] |data38 = {{{3rd_reading|}}} |label39 = [[Conference committee]] bill passed |data39 = {{{conf_committee_passed|}}} |label40 = Committee report |data40 = {{{committee_report|}}} |label41 = Bill introduced in the {{{enacted_by2|{{{considered_by2}}}}}} |data41 = {{{bill2|}}} |label42 = Bill citation |data42 = {{{bill_citation2|}}} |label43 = Bill published on |data43 = {{{bill_date2|}}} |label44 = Introduced by |data44 = {{{introduced_by2|}}} |label45 = First reading |data45 = {{{1st_reading2|}}} |label46 = Second reading |data46 = {{{2nd_reading2|}}} |label47 = {{{committee_whole_label2|Committee of the whole}}} |data47 = {{{committee_whole2|}}} |label48 = Third reading |data48 = {{{3rd_reading2|}}} |label49 = Conference committee bill passed |data49 = {{{conf_committee_passed2|}}} |label50 = Committee report |data50 = {{{committee_report2|}}} |label51 = Date passed by conference committee |data51 = {{{date_conf_committee|}}} |label52 = [[White paper#Government white papers|White paper]] |data52 = {{{white_paper|}}} |label53 = {{{enacted_by2|{{{considered_by2}}}}}} amendments considered by the {{{enacted_by|{{{considered_by}}}}}} |data53 = {{{date_amendments_considered|}}} |label54 = Finally passed both chambers |data54 = {{{date_final_passage|}}} |header60 = {{#if:{{{amends|}}}|Amends}} |data61 = {{{amends|}}} |header62 = {{#if:{{{repeals|}}}|[[Repeal]]s}} |data63 = {{{repeals|}}} |header64 = {{#if:{{{amended_by|{{{amendments|}}}}}}|Amended by}} |data65 = {{{amended_by|{{{amendments|}}}}}} |header66 = {{#if:{{{repealed_by|}}}|Repealed by}} |data67 = {{{repealed_by|}}} |header68 = {{#if:{{{related|{{{related_legislation|}}}}}}|Related legislation}} |data69 = {{{related|{{{related_legislation|}}}}}} |header70 = {{#if:{{{summary|}}}|Summary}} |data71 = {{{summary|}}} |header72 = {{#if:{{{keywords|}}}|Keywords}} |data73 = {{{keywords|}}} |header73 = {{#if:{{{original_text|}}}|[{{{original_text|}}} Text of statute as originally enacted]}} |belowstyle = background-color:{{#switch:{{lc:{{{status|}}}}} |pending = <nowiki>#</nowiki>FBEC5D |not passed = <nowiki>#</nowiki>FFCBDB |vetoed = <nowiki>#</nowiki>FFCBDB |withdrawn = <nowiki>#</nowiki>FFCBDB |blocked = <nowiki>#</nowiki>FFCBDB |void |void ab initio |halted = <nowiki>#</nowiki>FFCBDB |not yet in force |not fully in force = <nowiki>#</nowiki>FBEC5D |current |in force = <nowiki>#</nowiki>AAF0D1 |amended = <nowiki>#</nowiki>FFFFCC |expired |spent |repealed = <nowiki>#</nowiki>FFCCCC |#default = transparent; border-top:#aaa 1px solid; }}; |below = {{#if:{{{status|}}}|'''Status:''' {{#switch:{{lc:{{{status}}}}} |pending = Pending |not passed = Not passed |vetoed = Vetoed |withdrawn = Withdrawn |blocked = Blocked |not yet in force = Not yet in force |not fully in force = Not fully in force |current = Current legislation |in force = In force |amended = Amended |expired = Expired |spent = [[Spent enactment|Spent]] |repealed = [[Repeal]]ed |struck down = [[Judicial review|Struck down]] |halted = Halted |void = Void |void ab initio = Void ab initio |#default = Unknown }} }} }}{{#if:{{{amendments|}}}|[[Category:Pages using a deprecated parameter in the legislation infobox]]}}<noinclude> {{Documentation}}</noinclude> e691cd3a683148f0527f0b274bca56e8a45b89a3 Template:PAGENAMEBASE 10 74 172 171 2022-07-19T20:31:00Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{{{{|safesubst:}}}#Invoke:String|replace|{{{1|{{{{{|safesubst:}}}PAGENAME}}}}}|%s+%b()$||1|false}}<noinclude> {{documentation}} </noinclude> f23a5d434cb5b0baac5e1f58e9ceef9118e6873f Module:Documentation/styles.css 828 45 182 86 2022-07-19T20:31:04Z 17ademoladav 2 1 revision imported text text/plain /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } ce0e629c92e3d825ab9fd927fe6cc37d9117b6cb Module:Infobox 828 50 184 96 2022-07-19T20:31:04Z 17ademoladav 2 1 revision imported Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub( category_in_empty_row_pattern, '' ):match('^%S') then has_rows = true local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true root :tag('tr') :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true local row = root:tag('tr') row:addClass(imageArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(mw.getCurrentFrame():expandTemplate({title = 'italic title'})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if args.decat == 'yes' then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ base_templatestyles, -- see function description templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p 05a758c4532f643205b2300a5935f5d4ef3fc721 Module:Navbar 828 75 186 185 2022-07-19T20:31:05Z 17ademoladav 2 1 revision imported Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p ab8d0f06762f63ada7b225c4e1ab2a7037562880 Module:Navbar/configuration 828 76 188 187 2022-07-19T20:31:06Z 17ademoladav 2 1 revision imported Scribunto text/plain local configuration = { ['templatestyles'] = 'Module:Navbar/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['this_box'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } return configuration 7f1b6300bc4a690ecfb1c83b582f36c603bd1dff Template:If empty 10 15 190 26 2022-07-19T20:31:07Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:If empty|main}}<noinclude>{{Documentation}}</noinclude> 745940b7bdde8a1585c887ee4ee5ce81d98461a4 Template:Ifempty 10 77 192 191 2022-07-19T20:31:08Z 17ademoladav 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:If empty]] {{R from move}} fe8fc2d0520a0e1fd1a7759afa77e22d050d2d21 Template:Infobox legislation/images 10 19 194 34 2022-07-19T20:31:08Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly>{{#switch:{{{image|}}} <!--AUSTRALIA--> |[[Parliament of Australia]] = Australian Coat of Arms.png |[[Australian Capital Territory Legislative Assembly]] |[[Australian Capital Territory Legislative Assembly|ACT Legislative Assembly]] = Coat of Arms of the Australian Capital Territory.svg |[[Parliament of New South Wales]] = Coat of Arms of New South Wales.svg |[[Northern Territory Parliament]] = Northern Territory Legislative Assembly.jpg |[[Queensland Legislative Assembly]] = Coat of Arms of Queensland.svg |[[Parliament of South Australia]] = Adelaide parliament house.JPG |[[Parliament of Tasmania]] = Tasmania Coat of Arms.svg |[[Parliament of Victoria]] = Victoria Parliament House Melbourne.jpg |[[Parliament of Western Australia]] = Western Australian Coat of Arms.svg <!--BERMUDA--> |[[Parliament of Bermuda]] = Coat of arms of Bermuda.svg <!--CANADA--> |[[Parliament of Canada]] = Parliament-Ottawa.jpg |[[Legislative Assembly of Alberta]] = 2011 Alberta Legislature Building 03.jpg |[[Legislative Assembly of British Columbia]] = BC Legislature Buildings.jpg |[[Legislative Assembly of Manitoba]] = Parliamentwinnipeg manitoba.jpg |[[Legislative Assembly of New Brunswick]] = Legislative Assembly of New Brunswick.jpg |[[Newfoundland and Labrador House of Assembly]] = Colonialbuilding.jpg |[[Legislative Assembly of the Northwest Territories]] = Coat of arms of Northwest Territories.svg |[[Nova Scotia House of Assembly]] = Coat of arms of Nova Scotia.svg |[[Legislative Assembly of Nunavut]] = Leg Building Iqaluit 2000-08-27.jpg |[[Legislative Assembly of Ontario]] = Coat of Arms of Ontario.svg |[[Legislative Assembly of Prince Edward Island]] = 282 - Birthplace of Canada Charlottetown PEI.JPG |[[National Assembly of Quebec]] |[[National Assembly of Quebec|L'Assemblée Nationale du Québec]] = Armoiries du Québec.svg |[[Legislative Assembly of Saskatchewan]] = Sask Legislative Bldg.jpg |[[Yukon Legislative Assembly]] = Coat of arms of Yukon.svg <!--GIBRALTAR--> |[[Parliament of Gibraltar]] = Coat of arms of Gibraltar1.svg |[[Gibraltar Legislative Council]] = Coat of arms of Gibraltar1.svg <!--INDIA--> |[[Parliament of India]] = Emblem of India.svg <!--IRELAND--> |[[Oireachtas]] = Coat of arms of Ireland.svg <!--ISRAEL--> |[[Knesset]] = Israel Museum, Jerusalem P1110159 (5888320710).jpg <!--JAPAN--> |[[National Diet]] = Go-shichi no kiri crest 2.svg <!--KOREA--> |[[National Assembly of South Korea]] = National Assembly Building of the Republic of Korea.png <!--MALAYSIA--> |[[Parliament of Malaysia]] = Coat of arms of Malaysia.svg |[[Johor State Legislative Assembly]] = Sultan Ismail Building.JPG |[[Kedah State Legislative Assembly]] = Coat of arms of Kedah.svg |[[Kelantan State Legislative Assembly]] = Coat of arms of Kelantan.svg |[[Malacca State Legislative Assembly]] = Seri Negeri Blok Laksamana.JPG |[[Negeri Sembilan State Legislative Assembly]] = Coat of arms of Negeri Sembilan.svg |[[Pahang State Legislative Assembly]] = Coat of arms of Pahang.svg |[[Penang State Legislative Assembly]] = Dewan Undangan Negeri Penang Dec 2006 003.jpg |[[Perak State Legislative Assembly]] = Coat of arms of Perak.svg |[[Perlis State Legislative Assembly]] = Coat of arms of Perlis.svg |[[Sabah State Legislative Assembly]] = KotaKinabalu Sabah DewanUndanganNegeriSabah-01.jpg |[[Sarawak State Legislative Assembly]] = Sarawak state assembly building.jpg |[[Selangor State Legislative Assembly]] = Sultan Salahuddin Abdul Aziz Shah building.jpg |[[Terengganu State Legislative Assembly]] = Coat of arms of Terengganu.svg <!--NEW ZEALAND--> |[[New Zealand Parliament]] |[[Parliament of New Zealand]] = Coat of arms of New Zealand.svg <!--PHILIPPINES--> |[[National Assembly of the Philippines]] = Coat of arms of the Commonwealth of the Philippines.svg |[[Philippine Legislature]] = Coat of Arms Philippine Islands (1905–1936).svg |[[Commonwealth Congress]] = Coat of arms of the Commonwealth of the Philippines.svg |[[Batasang Pambansa]] = |[[Congress of the Philippines]] = Coat of Arms of the Philippines.svg |[[President of the Philippines]] = Seal of the President of the Philippines.svg <!--SINGAPORE--> |[[Parliament of Singapore]] = {{#ifexpr:{{gsd|day={{#time:j|{{{date|}}}}}|month={{#time:n|{{{date|}}}}}|year={{#time:Y|{{{date|}}}}} }}<730003|Old Parliament House 4, Singapore, Jan 06.JPG|Parliament House Singapore.jpg}} <!--SOUTH AFRICA--> |[[Parliament of South Africa]] = Coat of arms of South Africa (heraldic).svg |[[South African Parliament]] = Coat of arms of South Africa (heraldic).svg |[[Parliament of South Africa|Parliament&nbsp;of&nbsp;South&nbsp;Africa]] = Coat of arms of South Africa (heraldic).svg |[[Volksraad]] = Coat of Arms of the South African Republic.png |[[Eastern Cape Provincial Legislature]] = <!-- None --> |[[KwaZulu-Natal Legislature]] = KwaZulu-Natal Parliament building, Pietermaritzburg, South Africa.jpg |[[Western Cape Provincial Legislature]] |[[Western Cape Provincial Parliament]] = Western Cape provincial building.jpg <!--SOUTH AFRICA VARIANTS--> |[[Volksraad|Transvaal Volksraad]] = Coat of Arms of the South African Republic.png |[[Parliament of South Africa#1910|Parliament of South Africa]] = Coat of arms of South Africa (1910–1930).svg |[[Parliament of South Africa#1930|Parliament of South Africa]] = Coat of arms of South Africa (1930–1932).svg |[[Parliament of South Africa#1932|Parliament of South Africa]] = Coat of arms of South Africa (1932–2000).svg |[[Parliament of South Africa#1961|Parliament of South Africa]] = Coat of arms of South Africa (1932–2000).svg |[[Parliament of South Africa#1984|Parliament of South Africa]] = Coat of arms of South Africa (1932–2000).svg |[[Parliament of South Africa#1910|Parliament&nbsp;of&nbsp;South&nbsp;Africa]] = Coat of arms of South Africa (1910–1930).svg |[[Parliament of South Africa#1930|Parliament&nbsp;of&nbsp;South&nbsp;Africa]] = Coat of arms of South Africa (1930–1932).svg |[[Parliament of South Africa#1932|Parliament&nbsp;of&nbsp;South&nbsp;Africa]] = Coat of arms of South Africa (1932–2000).svg |[[Parliament of South Africa#1961|Parliament&nbsp;of&nbsp;South&nbsp;Africa]] = Coat of arms of South Africa (1932–2000).svg |[[Parliament of South Africa#1984|Parliament&nbsp;of&nbsp;South&nbsp;Africa]] = Coat of arms of South Africa (1932–2000).svg |[[South African Parliament#1910|South African Parliament]] = Coat of arms of South Africa (1910–1930).svg |[[South African Parliament#1930|South African Parliament]] = Coat of arms of South Africa (1930–1932).svg |[[South African Parliament#1932|South African Parliament]] = Coat of arms of South Africa (1932–2000).svg |[[South African Parliament#1961|South African Parliament]] = Coat of arms of South Africa (1932–2000).svg |[[South African Parliament#1984|South African Parliament]] = Coat of arms of South Africa (1932–2000).svg <!--STRAITS SETTLEMENTS--> |[[List of British Governors of the Straits Settlements|Governor of the Straits Settlements]] with the advice and consent of the [[Legislative Council of the Straits Settlements|Legislative Council]] = Coat of arms of the Straits Settlements.svg <!--UKRAINE--> |[[Verkhovna Rada]] = Будівля по вулиці Грушевського, 5.jpg <!--UNITED KINGDOM--> |[[Parliament of the United Kingdom]] = Royal Coat of Arms of the United Kingdom (HM Government).svg |[[Northern Ireland Assembly]] = Coat of Arms of Northern Ireland.svg |[[Parliament of Northern Ireland]] = Coat of Arms of Northern Ireland.svg |[[Scottish Parliament]] = Royal Coat of Arms of the United Kingdom (Scotland).svg |[[National Assembly for Wales]] = Royal Badge of Wales (2008).svg <!--USA--> |[[Government of the United States of America|Government of the United States of America]] = Great Seal of the United States (obverse).svg |[[United States Congress]] |[[Congress of the United States]] |[[Congress of the United States|US Congress]] |[[Congress of the United States|U.S. Congress]] = US Congressional Seal.svg |[[Alabama Legislature]] = Seal of Alabama.svg |[[Alaska Legislature]] = State Seal of Alaska.svg |[[Arizona Legislature]] = Arizonastateseal.jpg |[[Arkansas General Assembly]] = Seal of Arkansas.svg |[[California State Legislature]] = Seal of California.svg |[[Colorado General Assembly]] = Seal of Colorado.svg |[[Connecticut General Assembly]] = Connecticut State Capitol, Hartford.jpg |[[Michigan Legislature]] = Seal of Michigan.svg |[[Utah State Legislature]] = Seal of Utah.svg <!--DEFAULT--> |#default = <!-- None --> }}</includeonly><noinclude>{{Documentation}}</noinclude> 848212dfb5be22baf76aac5d4fe0e568b3404930 Template:Remove first word 10 27 196 50 2022-07-19T20:31:09Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:String|replace|source={{{1}}}|pattern=^[^{{{sep|%s}}}]*{{{sep|%s}}}*|replace=|plain=false}}<noinclude>{{Documentation}}</noinclude> df7a9e692f68be1581be06af5f51eaed5483b4c8 Template:Str left 10 31 198 58 2022-07-19T20:31:10Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly>{{safesubst:padleft:|{{{2|1}}}|{{{1}}}}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 2048b0d7b35e156528655b1d090e8b5ffab3f400 Template:Template other 10 34 200 64 2022-07-19T20:31:10Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Template}} | template | other }} }} | template = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 06fb13d264df967b5232141067eb7d2b67372d76 Module:If empty 828 49 202 94 2022-07-19T20:31:11Z 17ademoladav 2 1 revision imported Scribunto text/plain local p = {} function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false}) local lastk = 0 for k,v in ipairs(args) do if v ~= '' then return v end lastk = k end end return p 4bfc0c7c8bf3b63144db1ea12f2260db00421233 Module:InfoboxImage 828 52 204 100 2022-07-19T20:31:12Z 17ademoladav 2 1 revision imported Scribunto text/plain -- Inputs: -- image - Can either be a bare filename (with or without the File:/Image: prefix) or a fully formatted image link -- page - page to display for multipage images (DjVu) -- size - size to display the image -- maxsize - maximum size for image -- sizedefault - default size to display the image if size param is blank -- alt - alt text for image -- title - title text for image -- border - set to yes if border -- center - set to yes, if the image has to be centered -- upright - upright image param -- suppressplaceholder - if yes then checks to see if image is a placeholder and suppresses it -- link - page to visit when clicking on image -- class - HTML classes to add to the image -- Outputs: -- Formatted image. -- More details available at the "Module:InfoboxImage/doc" page local i = {}; local placeholder_image = { "Blue - Replace this image female.svg", "Blue - Replace this image male.svg", "Female no free image yet.png", "Flag of None (square).svg", "Flag of None.svg", "Flag of.svg", "Green - Replace this image female.svg", "Green - Replace this image male.svg", "Image is needed female.svg", "Image is needed male.svg", "Location map of None.svg", "Male no free image yet.png", "Missing flag.png", "No flag.svg", "No free portrait.svg", "No portrait (female).svg", "No portrait (male).svg", "Red - Replace this image female.svg", "Red - Replace this image male.svg", "Replace this image female (blue).svg", "Replace this image female.svg", "Replace this image male (blue).svg", "Replace this image male.svg", "Silver - Replace this image female.svg", "Silver - Replace this image male.svg", "Replace this image.svg", "Cricket no pic.png", "CarersLogo.gif", "Diagram Needed.svg", "Example.jpg", "Image placeholder.png", "No male portrait.svg", "Nocover-upload.png", "NoDVDcover copy.png", "Noribbon.svg", "No portrait-BFD-test.svg", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Sin bandera.svg", "Sin escudo.svg", "Replace this image - temple.png", "Replace this image butterfly.png", "Replace this image.svg", "Replace this image1.svg", "Resolution angle.png", "Image-No portrait-text-BFD-test.svg", "Insert image here.svg", "No image available.png", "NO IMAGE YET square.png", "NO IMAGE YET.png", "No Photo Available.svg", "No Screenshot.svg", "No-image-available.jpg", "Null.png", "PictureNeeded.gif", "Place holder.jpg", "Unbenannt.JPG", "UploadACopyrightFreeImage.svg", "UploadAnImage.gif", "UploadAnImage.svg", "UploadAnImageShort.svg", "CarersLogo.gif", "Diagram Needed.svg", "No male portrait.svg", "NoDVDcover copy.png", "Placeholder barnstar ribbon.png", "Project Trains no image.png", "Image-request.png", "Noimage.gif", } function i.IsPlaceholder(image) -- change underscores to spaces image = mw.ustring.gsub(image, "_", " "); assert(image ~= nil, 'mw.ustring.gsub(image, "_", " ") must not return nil') -- if image starts with [[ then remove that and anything after | if mw.ustring.sub(image,1,2) == "[[" then image = mw.ustring.sub(image,3); image = mw.ustring.gsub(image, "([^|]*)|.*", "%1"); assert(image ~= nil, 'mw.ustring.gsub(image, "([^|]*)|.*", "%1") must not return nil') end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); assert(image ~= nil, "mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1') must not return nil") -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); -- capitalise first letter image = mw.ustring.upper(mw.ustring.sub(image,1,1)) .. mw.ustring.sub(image,2); for i,j in pairs(placeholder_image) do if image == j then return true end end return false end function i.InfoboxImage(frame) local image = frame.args["image"]; if image == "" or image == nil then return ""; end if image == "&nbsp;" then return image; end if frame.args["suppressplaceholder"] ~= "no" then if i.IsPlaceholder(image) == true then return ""; end end if mw.ustring.lower(mw.ustring.sub(image,1,5)) == "http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "[http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[[http:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,6)) == "https:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,7)) == "[https:" then return ""; end if mw.ustring.lower(mw.ustring.sub(image,1,8)) == "[[https:" then return ""; end if mw.ustring.sub(image,1,2) == "[[" then -- search for thumbnail images and add to tracking cat if found local cat = ""; if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, "|%s*thumb%s*[|%]]") or mw.ustring.find(image, "|%s*thumbnail%s*[|%]]")) then cat = "[[Category:Pages using infoboxes with thumbnail images]]"; end return image .. cat; elseif mw.ustring.sub(image,1,2) == "{{" and mw.ustring.sub(image,1,3) ~= "{{{" then return image; elseif mw.ustring.sub(image,1,1) == "<" then return image; elseif mw.ustring.sub(image,1,5) == mw.ustring.char(127).."UNIQ" then -- Found strip marker at begining, so pass don't process at all return image; elseif mw.ustring.sub(image,4,9) == "`UNIQ-" then -- Found strip marker at begining, so pass don't process at all return image; else local result = ""; local page = frame.args["page"]; local size = frame.args["size"]; local maxsize = frame.args["maxsize"]; local sizedefault = frame.args["sizedefault"]; local alt = frame.args["alt"]; local link = frame.args["link"]; local title = frame.args["title"]; local border = frame.args["border"]; local upright = frame.args["upright"] or ""; local thumbtime = frame.args["thumbtime"] or ""; local center = frame.args["center"]; local class = frame.args["class"]; -- remove prefix if exists local allNames = mw.site.namespaces[6].aliases allNames[#allNames + 1] = mw.site.namespaces[6].name allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName for i, name in ipairs(allNames) do if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. ":") then image = mw.ustring.sub(image, mw.ustring.len(name) + 2); break end end if maxsize ~= "" and maxsize ~= nil then -- if no sizedefault then set to maxsize if sizedefault == "" or sizedefault == nil then sizedefault = maxsize end -- check to see if size bigger than maxsize if size ~= "" and size ~= nil then local sizenumber = tonumber(mw.ustring.match(size,"%d*")) or 0; local maxsizenumber = tonumber(mw.ustring.match(maxsize,"%d*")) or 0; if sizenumber>maxsizenumber and maxsizenumber>0 then size = maxsize; end end end -- add px to size if just a number if (tonumber(size) or 0) > 0 then size = size .. "px"; end -- add px to sizedefault if just a number if (tonumber(sizedefault) or 0) > 0 then sizedefault = sizedefault .. "px"; end result = "[[File:" .. image; if page ~= "" and page ~= nil then result = result .. "|page=" .. page; end if size ~= "" and size ~= nil then result = result .. "|" .. size; elseif sizedefault ~= "" and sizedefault ~= nil then result = result .. "|" .. sizedefault; else result = result .. "|frameless"; end if center == "yes" then result = result .. "|center" end if alt ~= "" and alt ~= nil then result = result .. "|alt=" .. alt; end if link ~= "" and link ~= nil then result = result .. "|link=" .. link; end if border == "yes" then result = result .. "|border"; end if upright == "yes" then result = result .. "|upright"; elseif upright ~= "" then result = result .. "|upright=" .. upright; end if thumbtime ~= "" then result = result .. "|thumbtime=" .. thumbtime; end if class ~= nil and class ~= "" then result = result .. "|class=" .. class; end -- if alt value is a keyword then do not use as a description if alt == "thumbnail" or alt == "thumb" or alt == "frameless" or alt == "left" or alt == "center" or alt == "right" or alt == "upright" or alt == "border" or mw.ustring.match(alt or "", '^[0-9]*px$', 1) ~= nil then alt = nil; end if title ~= "" and title ~= nil then -- does title param contain any templatestyles? If yes then set to blank. if mw.ustring.match(frame:preprocess(title), 'UNIQ%-%-templatestyles', 1) ~= nil then title = nil; end end if title ~= "" and title ~= nil then result = result .. "|" .. title; end result = result .. "]]"; return result; end end return i; 0ee5fe75ba239fc5c9cedc81ca11bdc0be068542 Module:String 828 61 206 118 2022-07-19T20:31:13Z 17ademoladav 2 1 revision imported Scribunto text/plain --[[ This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. Global options ignore_errors: If set to 'true' or 1, any error condition will result in an empty string being returned rather than an error message. error_category: If an error occurs, specifies the name of a category to include with the error message. The default category is [Category:Errors reported by Module String]. no_category: If set to 'true' or 1, no category will be added if an error is generated. Unit tests for this module are available at Module:String/tests. ]] local str = {} --[[ len This function returns the length of the target string. Usage: {{#invoke:String|len|target_string|}} OR {{#invoke:String|len|s=target_string}} Parameters s: The string whose length to report If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. ]] function str.len( frame ) local new_args = str._getParameters( frame.args, {'s'} ) local s = new_args['s'] or '' return mw.ustring.len( s ) end --[[ sub This function returns a substring of the target string at specified indices. Usage: {{#invoke:String|sub|target_string|start_index|end_index}} OR {{#invoke:String|sub|s=target_string|i=start_index|j=end_index}} Parameters s: The string to return a subset of i: The fist index of the substring to return, defaults to 1. j: The last index of the string to return, defaults to the last character. The first character of the string is assigned an index of 1. If either i or j is a negative value, it is interpreted the same as selecting a character by counting from the end of the string. Hence, a value of -1 is the same as selecting the last character of the string. If the requested indices are out of range for the given string, an error is reported. ]] function str.sub( frame ) local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } ) local s = new_args['s'] or '' local i = tonumber( new_args['i'] ) or 1 local j = tonumber( new_args['j'] ) or -1 local len = mw.ustring.len( s ) -- Convert negatives for range checking if i < 0 then i = len + i + 1 end if j < 0 then j = len + j + 1 end if i > len or j > len or i < 1 or j < 1 then return str._error( 'String subset index out of range' ) end if j < i then return str._error( 'String subset indices out of order' ) end return mw.ustring.sub( s, i, j ) end --[[ This function implements that features of {{str sub old}} and is kept in order to maintain these older templates. ]] function str.sublength( frame ) local i = tonumber( frame.args.i ) or 0 local len = tonumber( frame.args.len ) return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) ) end --[[ _match This function returns a substring from the source string that matches a specified pattern. It is exported for use in other modules Usage: strmatch = require("Module:String")._match sresult = strmatch( s, pattern, start, match, plain, nomatch ) Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This sub-routine is exported for use in other modules function str._match( s, pattern, start, match_index, plain_flag, nomatch ) if s == '' then return str._error( 'Target string is empty' ) end if pattern == '' then return str._error( 'Pattern string is empty' ) end start = tonumber(start) or 1 if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then return str._error( 'Requested start is out of range' ) end if match_index == 0 then return str._error( 'Match index is out of range' ) end if plain_flag then pattern = str._escapePattern( pattern ) end local result if match_index == 1 then -- Find first match is simple case result = mw.ustring.match( s, pattern, start ) else if start > 1 then s = mw.ustring.sub( s, start ) end local iterator = mw.ustring.gmatch(s, pattern) if match_index > 0 then -- Forward search for w in iterator do match_index = match_index - 1 if match_index == 0 then result = w break end end else -- Reverse search local result_table = {} local count = 1 for w in iterator do result_table[count] = w count = count + 1 end result = result_table[ count + match_index ] end end if result == nil then if nomatch == nil then return str._error( 'Match not found' ) else return nomatch end else return result end end --[[ match This function returns a substring from the source string that matches a specified pattern. Usage: {{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}} OR {{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index |match=match_number|plain=plain_flag|nomatch=nomatch_output}} Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from each string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. If the match_number or start_index are out of range for the string being queried, then this function generates an error. An error is also generated if no match is found. If one adds the parameter ignore_errors=true, then the error will be suppressed and an empty string will be returned on any failure. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This is the entry point for #invoke:String|match function str.match( frame ) local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} ) local s = new_args['s'] or '' local start = tonumber( new_args['start'] ) or 1 local plain_flag = str._getBoolean( new_args['plain'] or false ) local pattern = new_args['pattern'] or '' local match_index = math.floor( tonumber(new_args['match']) or 1 ) local nomatch = new_args['nomatch'] return str._match( s, pattern, start, match_index, plain_flag, nomatch ) end --[[ pos This function returns a single character from the target string at position pos. Usage: {{#invoke:String|pos|target_string|index_value}} OR {{#invoke:String|pos|target=target_string|pos=index_value}} Parameters target: The string to search pos: The index for the character to return If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. The first character has an index value of 1. If one requests a negative value, this function will select a character by counting backwards from the end of the string. In other words pos = -1 is the same as asking for the last character. A requested value of zero, or a value greater than the length of the string returns an error. ]] function str.pos( frame ) local new_args = str._getParameters( frame.args, {'target', 'pos'} ) local target_str = new_args['target'] or '' local pos = tonumber( new_args['pos'] ) or 0 if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then return str._error( 'String index out of range' ) end return mw.ustring.sub( target_str, pos, pos ) end --[[ str_find This function duplicates the behavior of {{str_find}}, including all of its quirks. This is provided in order to support existing templates, but is NOT RECOMMENDED for new code and templates. New code is recommended to use the "find" function instead. Returns the first index in "source" that is a match to "target". Indexing is 1-based, and the function returns -1 if the "target" string is not present in "source". Important Note: If the "target" string is empty / missing, this function returns a value of "1", which is generally unexpected behavior, and must be accounted for separatetly. ]] function str.str_find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target'} ) local source_str = new_args['source'] or '' local target_str = new_args['target'] or '' if target_str == '' then return 1 end local start = mw.ustring.find( source_str, target_str, 1, true ) if start == nil then start = -1 end return start end --[[ find This function allows one to search for a target string or pattern within another string. Usage: {{#invoke:String|find|source_str|target_string|start_index|plain_flag}} OR {{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}} Parameters source: The string to search target: The string or pattern to find within source start: The index within the source string to start the search, defaults to 1 plain: Boolean flag indicating that target should be understood as plain text and not as a Lua style regular expression, defaults to true If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. This function returns the first index >= "start" where "target" can be found within "source". Indices are 1-based. If "target" is not found, then this function returns 0. If either "source" or "target" are missing / empty, this function also returns 0. This function should be safe for UTF-8 strings. ]] function str.find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['target'] or '' local start_pos = tonumber(new_args['start']) or 1 local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return 0 end plain = str._getBoolean( plain ) local start = mw.ustring.find( source_str, pattern, start_pos, plain ) if start == nil then start = 0 end return start end --[[ replace This function allows one to replace a target string or pattern within another string. Usage: {{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}} OR {{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string| count=replacement_count|plain=plain_flag}} Parameters source: The string to search pattern: The string or pattern to find within source replace: The replacement text count: The number of occurences to replace, defaults to all. plain: Boolean flag indicating that pattern should be understood as plain text and not as a Lua style regular expression, defaults to true ]] function str.replace( frame ) local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['pattern'] or '' local replace = new_args['replace'] or '' local count = tonumber( new_args['count'] ) local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return source_str end plain = str._getBoolean( plain ) if plain then pattern = str._escapePattern( pattern ) replace = mw.ustring.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences. end local result if count ~= nil then result = mw.ustring.gsub( source_str, pattern, replace, count ) else result = mw.ustring.gsub( source_str, pattern, replace ) end return result end --[[ simple function to pipe string.rep to templates. ]] function str.rep( frame ) local repetitions = tonumber( frame.args[2] ) if not repetitions then return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' ) end return string.rep( frame.args[1] or '', repetitions ) end --[[ escapePattern This function escapes special characters from a Lua string pattern. See [1] for details on how patterns work. [1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns Usage: {{#invoke:String|escapePattern|pattern_string}} Parameters pattern_string: The pattern string to escape. ]] function str.escapePattern( frame ) local pattern_str = frame.args[1] if not pattern_str then return str._error( 'No pattern string specified' ) end local result = str._escapePattern( pattern_str ) return result end --[[ count This function counts the number of occurrences of one string in another. ]] function str.count(frame) local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'}) local source = args.source or '' local pattern = args.pattern or '' local plain = str._getBoolean(args.plain or true) if plain then pattern = str._escapePattern(pattern) end local _, count = mw.ustring.gsub(source, pattern, '') return count end --[[ endswith This function determines whether a string ends with another string. ]] function str.endswith(frame) local args = str._getParameters(frame.args, {'source', 'pattern'}) local source = args.source or '' local pattern = args.pattern or '' if pattern == '' then -- All strings end with the empty string. return "yes" end if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then return "yes" else return "" end end --[[ join Join all non empty arguments together; the first argument is the separator. Usage: {{#invoke:String|join|sep|one|two|three}} ]] function str.join(frame) local args = {} local sep for _, v in ipairs( frame.args ) do if sep then if v ~= '' then table.insert(args, v) end else sep = v end end return table.concat( args, sep or '' ) end --[[ Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters. This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application. ]] function str._getParameters( frame_args, arg_list ) local new_args = {} local index = 1 local value for _, arg in ipairs( arg_list ) do value = frame_args[arg] if value == nil then value = frame_args[index] index = index + 1 end new_args[arg] = value end return new_args end --[[ Helper function to handle error messages. ]] function str._error( error_str ) local frame = mw.getCurrentFrame() local error_category = frame.args.error_category or 'Errors reported by Module String' local ignore_errors = frame.args.ignore_errors or false local no_category = frame.args.no_category or false if str._getBoolean(ignore_errors) then return '' end local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>' if error_category ~= '' and not str._getBoolean( no_category ) then error_str = '[[Category:' .. error_category .. ']]' .. error_str end return error_str end --[[ Helper Function to interpret boolean strings ]] function str._getBoolean( boolean_str ) local boolean_value if type( boolean_str ) == 'string' then boolean_str = boolean_str:lower() if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0' or boolean_str == '' then boolean_value = false else boolean_value = true end elseif type( boolean_str ) == 'boolean' then boolean_value = boolean_str else error( 'No boolean value found' ) end return boolean_value end --[[ Helper function that escapes all pattern characters so that they will be treated as plain text. ]] function str._escapePattern( pattern_str ) return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" ) end return str 6df794dd52434e0f6a372c9918f5a9dedd15f579 Module:Collapsible list 828 42 318 80 2022-07-21T00:55:37Z wikipedia>Izno 0 remove none none; not necessary for currently supported browsers Scribunto text/plain -- This module implements {{collapsible list}}. local p = {} local function gettitlestyletracking( ts ) if not ts then return '' end ts = mw.ustring.gsub(mw.ustring.lower(ts), '%s', '') local tsvals = mw.text.split(ts, ';') table.sort(tsvals) local skey = table.concat(tsvals,';') skey = mw.ustring.gsub(skey, '^;', '') skey = mw.text.encode(mw.text.encode(skey),'%c%[%]=') if (mw.ustring.match(';' .. ts, ';background:') or mw.ustring.match(';' .. ts, ';background%-color:')) and mw.ustring.match(';' .. ts, ';text%-align:') then return '[[Category:Pages using collapsible list with both background and text-align in titlestyle|' .. skey .. ' ]]' end return '[[Category:Pages using collapsible list without both background and text-align in titlestyle|' .. skey .. ' ]]' end local function getListItem( data ) if not type( data ) == 'string' then return '' end return mw.ustring.format( '<li style="line-height: inherit; margin: 0">%s</li>', data ) end -- Returns an array containing the keys of all positional arguments -- that contain data (i.e. non-whitespace values). local function getArgNums( args ) local nums = {} for k, v in pairs( args ) do if type( k ) == 'number' and k >= 1 and math.floor( k ) == k and type( v ) == 'string' and mw.ustring.match( v, '%S' ) then table.insert( nums, k ) end end table.sort( nums ) return nums end -- Formats a list of classes, styles or other attributes. local function formatAttributes( attrType, ... ) local attributes = { ... } local nums = getArgNums( attributes ) local t = {} for i, num in ipairs( nums ) do table.insert( t, attributes[ num ] ) end if #t == 0 then return '' -- Return the blank string so concatenation will work. end return mw.ustring.format( ' %s="%s"', attrType, table.concat( t, ' ' ) ) end local function buildList( args ) -- Get the list items. local listItems = {} local argNums = getArgNums( args ) for i, num in ipairs( argNums ) do table.insert( listItems, getListItem( args[ num ] ) ) end if #listItems == 0 then return '' end listItems = table.concat( listItems ) -- hack around mw-collapsible show/hide jumpiness by looking for text-alignment -- by setting a margin if centered local textAlignmentCentered = 'text%-align%s*:%s*center' local centeredTitle = (args.title_style and args.title_style:lower():match(textAlignmentCentered) or args.titlestyle and args.titlestyle:lower():match(textAlignmentCentered)) local centeredTitleSpacing if centeredTitle then centeredTitleSpacing = 'margin: 0 4em' else centeredTitleSpacing = '' end -- Get class, style and title data. local collapsibleContainerClass = formatAttributes( 'class', 'mw-collapsible', not args.expand and 'mw-collapsed' ) local collapsibleContainerStyle = formatAttributes( 'style', 'text-align: center; font-size: 95%;', args.frame_style, args.framestyle ) local collapsibleTitleStyle = formatAttributes( 'style', 'line-height: 1.6em; font-weight: bold; font-size: 100%; text-align: left;', args.title_style, args.titlestyle ) local jumpyTitleStyle = formatAttributes( 'style', centeredTitleSpacing ) local title = args.title or 'List' local ulclass = formatAttributes( 'class', 'mw-collapsible-content', args.hlist and 'hlist' ) local ulstyle = formatAttributes( 'style', 'font-size: 105%; margin-top: 0; margin-bottom: 0; line-height: inherit; text-align: left;', not args.bullets and 'list-style: none; margin-left: 0;', args.list_style, args.liststyle ) -- Build the list. return mw.ustring.format( '<div%s%s>\n<div%s><div%s>%s</div></div>\n<ul%s%s>%s</ul>\n</div>', collapsibleContainerClass, collapsibleContainerStyle, collapsibleTitleStyle, jumpyTitleStyle, title, ulclass, ulstyle, listItems ) .. gettitlestyletracking(args.title_style or args.titlestyle) end function p.main( frame ) local origArgs if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args for k, v in pairs( frame.args ) do origArgs = frame.args break end else origArgs = frame end local args = {} for k, v in pairs( origArgs ) do if type( k ) == 'number' or v ~= '' then args[ k ] = v end end return buildList( args ) end return p ff6c942509353d70048c07849e18853f5b6e9aa8 Module:InfoboxImage/doc 828 124 306 2022-07-21T19:56:32Z en>Ahecht 0 document class parameter wikitext text/x-wiki {{used in system}} {{Module rating|protected}} ==Overview== This module is used within infoboxes to process the image parameters and tidy up the formatting of the result. ==Parameters== {| class="wikitable" ! Parameter ! Description |- | image | Required. The main parameter that should be passed over which contains the image info. |- | size | Size to display image. |- | maxsize | Maximum size to display image. Note: If no size or sizedefault params specified then image will be shown at maxsize. |- | sizedefault | The size to use for the image if no size param is specified. Defaults to [[Wikipedia:Autosizing images|frameless]]. |- | alt | Alt text for the image. |- | title | Title text for image (mouseover text). |- | border | If yes, then a border is added. |- | page | The page number to be displayed when using a multi-page image. |- | upright | If upright=yes, adds "upright" which displays image at 75% of default image size (which is 220px if not changed at [[Special:Preferences]]). If a value, adds "upright=''value''" to image, where values less than 1 scale the image down (0.9 = 90%) and values greater than 1 scale the image up (1.15 = 115%). |- | center | If yes, then the image is centered. |- | thumbtime | thumbtime param, used for video clips. |- | suppressplaceholder | If no, then will not suppress certain placeholder images. See {{section link||Placeholder images which can be suppressed}}. |- | link | Page to go to when clicking on the image. |- | class | HTML classes to add to the image. |} Note: If you specify the maxsize or sizedefault params, then you should include the px after the number. {{Use dmy dates|date=July 2016}} ==Parameters displayed in image syntax== All parameters: :<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size={{{size}}} | maxsize={{{maxsize}}} | sizedefault={{{sizedefault}}} | upright={{{upright}}} | alt={{{alt}}} | title={{{title}}} | thumbtime={{{thumbtime}}} | link={{{link}}} | border=yes | center=yes | page={{{page}}} | class={{{class}}} }}</pre> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size={{{size}}} | maxsize={{{maxsize}}} | sizedefault={{{sizedefault}}} | upright={{{upright}}} | alt={{{alt}}} | title={{{title}}} | thumbtime={{{thumbtime}}} | link={{{link}}} | border=yes | center=yes | page={{{page}}} | class={{{class}}}}}</code> When "size" and "maxsize" are defined, the smaller of the two is used (if "px" is omitted it will be added by the module): :<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size=300px | maxsize=250px }}</pre> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size=300px | maxsize=250px }}</code> When "size" is not defined, "sizedefault" is used, even if larger than "maxsize" (in actual use "px" is required after the number; omitted here to show it is not added by the module): :<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | sizedefault=250px | maxsize=200px }}</pre> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | sizedefault=250px | maxsize=200px }}</code> When "size" and "sizedefault" are not defined, "maxsize" is used (in actual use "px" is required after the number; omitted here to show it is not added by the module): :<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | maxsize=250px }}</pre> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | maxsize=250px }}</code> When "size", "sizedefault", and "maxsize" are not defined, "frameless" is added, which displays the image at the default thumbnail size (220px, but logged in users can change this at [[Special:Preferences]]) and is required if using "upright" to scale the default size: :<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} }}</pre> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} }}</code> Use of "upright" without a number value, which displays the image at approximately 75% of the user's default size (multiplied by 0.75 then rounded to nearest 10): :<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | upright = yes }}</pre> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | upright = yes }}</code> When "alt" is used without "title", the alt text is also used as the title: :<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | alt = Alt text }}</pre> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | alt = Alt text }}</code> For more information, see [[Wikipedia:Extended image syntax]]. ==Sample usage== <pre style="overflow:auto;"> |image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|upright={{{image_upright|1}}}|alt={{{alt|}}}}} </pre> ==Examples== {| class="wikitable" |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg}}</nowiki><br /> <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=File:Abbey Rd Studios.jpg}}</nowiki><br /> <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Image:Abbey Rd Studios.jpg}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|upright=yes}}</nowiki><br /> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|upright=yes}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|upright=1.2}}</nowiki><br /> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|upright=1.2}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100px}}</nowiki><br /> <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100px}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=[[Image:Abbey Rd Studios.jpg|200px]]}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=[[Image:Abbey Rd Studios.jpg|200px]]}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=[[Image:Abbey Rd Studios.jpg|200px]]|title=Abbey Road!}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=[[Image:Abbey Rd Studios.jpg|200px]]|title=Abbey Road!}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250|alt=The front stairs and door of Abbey Road Studios}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250|alt=The front stairs and door of Abbey Road Studios}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios|title=Exterior, front view of Abbey Road studios}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios|title=Exterior, front view of Abbey Road studios}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|alt=The front stairs and door of Abbey Road Studios}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|alt=The front stairs and door of Abbey Road Studios}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100px|alt=The front stairs and door of Abbey Road Studios}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100px|alt=The front stairs and door of Abbey Road Studios}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Bandera de Bilbao.svg|size=100|border=yes}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Bandera de Bilbao.svg|size=200|border=yes}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Image is needed male.svg}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Image is needed male.svg}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Image is needed male.svg|suppressplaceholder=no}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Image is needed male.svg|suppressplaceholder=no}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=[[File:Image is needed male.svg|200px]]}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=[[File:Image is needed male.svg|200px]]}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=[[File:Image is needed male.svg|200px]]|suppressplaceholder=no}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=[[File:Image is needed male.svg|200px]]|suppressplaceholder=no}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=50px|maxsize=100px}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=50px|maxsize=100px}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=200px|maxsize=100px}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=200px|maxsize=100px}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=[[File:Abbey Rd Studios.jpg|200px]]|maxsize=100px}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=[[File:Abbey Rd Studios.jpg|200px]]|maxsize=100px}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|maxsize=100px|center=yes}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|maxsize=100px|center=yes}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=no such image|maxsize=100px|center=yes}}</nowiki><!-- this issue sh'd be fixed somewhow--> | {{#invoke:InfoboxImage|InfoboxImage|image=no such image|maxsize=100px|center=yes}} |} == Placeholder images which can be suppressed == {| | style="vertical-align:top;" | * [[:File:Blue - replace this image female.svg]] * [[:File:Blue - replace this image male.svg]] * [[:File:Female no free image yet.png]] * [[:File:Male no free image yet.png]] * [[:File:Flag of None (square).svg]] * [[:File:Flag of None.svg]] * [[:File:Flag of.svg]] * [[:File:Green - replace this image female.svg]] * [[:File:Green - replace this image male.svg]] * [[:File:Image is needed female.svg]] * [[:File:Image is needed male.svg]] * [[:File:Location map of None.svg]] * [[:File:Male no free image yet.png]] * [[:File:Missing flag.png]] * [[:File:No flag.svg]] * [[:File:No free portrait.svg]] * [[:File:No portrait (female).svg]] * [[:File:No portrait (male).svg]] * [[:File:Red - replace this image female.svg]] * [[:File:Red - replace this image male.svg]] * [[:File:Replace this image female (blue).svg]] * [[:File:Replace this image female.svg]] * [[:File:Replace this image male (blue).svg]] * [[:File:Replace this image male.svg]] * [[:File:Silver - replace this image female.svg]] * [[:File:Silver - replace this image male.svg]] * [[:File:Replace this image.svg]] * [[:File:Cricket no pic.png]] * [[:File:CarersLogo.gif]] * [[:File:Diagram Needed.svg]] * [[:File:Example.jpg]] * [[:File:Image placeholder.png]] * [[:File:No male portrait.svg]] * [[:File:Nocover-upload.png]] * [[:File:NoDVDcover copy.png]] * [[:File:Noribbon.svg]] | style="vertical-align:top;" | * [[:File:No portrait-BFD-test.svg]] * [[:File:Placeholder barnstar ribbon.png]] * [[:File:Project Trains no image.png]] * [[:File:Image-request.png]] * [[:File:Sin bandera.svg]] * [[:File:Sin escudo.svg]] * [[:File:Replace this image - temple.png]] * [[:File:Replace this image butterfly.png]] * [[:File:Replace this image.svg]] * [[:File:Replace this image1.svg]] * [[:File:Resolution angle.png]] * [[:File:Image-No portrait-text-BFD-test.svg]] * [[:File:Insert image here.svg]] * [[:File:No image available.png]] * [[:File:NO IMAGE YET square.png]] * [[:File:NO IMAGE YET.png]] * [[:File:No Photo Available.svg]] * [[:File:No Screenshot.svg]] * [[:File:No-image-available.jpg]] * [[:File:Null.png]] * [[:File:PictureNeeded.gif]] * [[:File:Place holder.jpg]] * [[:File:Unbenannt.JPG]] * [[:File:UploadACopyrightFreeImage.svg]] * [[:File:UploadAnImage.gif]] * [[:File:UploadAnImage.svg]] * [[:File:UploadAnImageShort.svg]] * [[:File:CarersLogo.gif]] * [[:File:Diagram Needed.svg]] * [[:File:No male portrait.svg]] * [[:File:NoDVDcover copy.png]] * [[:File:Placeholder barnstar ribbon.png]] * [[:File:Project Trains no image.png]] * [[:File:Image-request.png]] |} == Tracking categories == * {{clc|Pages using infoboxes with thumbnail images}} <includeonly>{{Sandbox other|| {{DEFAULTSORT:Image, {{PAGENAME}}}} [[Category:Modules for image handling]] [[Category:Modules that add a tracking category]] [[Category:Infobox modules]] }}</includeonly> 0222bb0296d46855530b9cacd464c3cdf2e987c3 Template:Para 10 25 228 46 2022-07-22T08:06:17Z en>TheDJ 0 breakup super long words, so we do not overflow the viewport. wikitext text/x-wiki <code class="tpl-para" style="word-break:break-word;{{SAFESUBST:<noinclude />#if:{{{plain|}}}|border: none; background-color: inherit;}} {{SAFESUBST:<noinclude />#if:{{{plain|}}}{{{mxt|}}}{{{green|}}}{{{!mxt|}}}{{{red|}}}|color: {{SAFESUBST:<noinclude />#if:{{{mxt|}}}{{{green|}}}|#006400|{{SAFESUBST:<noinclude />#if:{{{!mxt|}}}{{{red|}}}|#8B0000|inherit}}}};}} {{SAFESUBST:<noinclude />#if:{{{style|}}}|{{{style}}}}}">&#124;{{SAFESUBST:<noinclude />#if:{{{1|}}}|{{{1}}}&#61;}}{{{2|}}}</code><noinclude> {{Documentation}} <!--Categories and interwikis go near the bottom of the /doc subpage.--> </noinclude> 06006deea2ed5d552aab61b4332321ab749ae7e8 229 228 2022-08-01T10:56:28Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <code class="tpl-para" style="word-break:break-word;{{SAFESUBST:<noinclude />#if:{{{plain|}}}|border: none; background-color: inherit;}} {{SAFESUBST:<noinclude />#if:{{{plain|}}}{{{mxt|}}}{{{green|}}}{{{!mxt|}}}{{{red|}}}|color: {{SAFESUBST:<noinclude />#if:{{{mxt|}}}{{{green|}}}|#006400|{{SAFESUBST:<noinclude />#if:{{{!mxt|}}}{{{red|}}}|#8B0000|inherit}}}};}} {{SAFESUBST:<noinclude />#if:{{{style|}}}|{{{style}}}}}">&#124;{{SAFESUBST:<noinclude />#if:{{{1|}}}|{{{1}}}&#61;}}{{{2|}}}</code><noinclude> {{Documentation}} <!--Categories and interwikis go near the bottom of the /doc subpage.--> </noinclude> 06006deea2ed5d552aab61b4332321ab749ae7e8 Template:Infobox UN resolution 10 129 320 2022-07-23T14:26:10Z wikipedia>Kwamikagami 0 wikitext text/x-wiki {{main other|{{short description|United Nations resolution {{lc:{{{result|}}}}} {{#if:{{{year|}}}|in {{{year|}}}}}|noreplace}}}} <includeonly>{{Infobox | abovestyle = border-top:8px solid #009edb;padding-bottom:0.25em;border-bottom:2px solid #009edb; | above = UN {{#switch:{{uc:{{{organ}}}}} |GA=[[United Nations General Assembly|General Assembly]]<br>[[United Nations General Assembly resolution|Resolution]] |SC=[[United Nations Security Council|Security Council]]<br>[[United Nations Security Council resolution|Resolution]] |#default={{{organ|([[United Nations]])}}} }} {{{number}}} | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{image_size|{{{width|}}}}}}|sizedefault=230px|alt={{{alt|{{{image_alt|}}}}}}}} | caption = {{{caption|}}} | headerstyle = background:#ddd; | label1 = Date | data1 = {{{date}}} {{{year}}} | label2 = Meeting&nbsp;no. | data2 = {{{meeting|}}} | label3 = Code | data3 = {{#if:{{{code|}}} |{{{code}}}{{#if:{{{document|}}} | |<span style="display:none">}} ([{{#ifeq:{{{document}}}|yes|https://undocs.org/{{replace|{{{code}}}| |}}|{{{document}}} }} Document]){{#if:{{{document|}}} | |</span>}} }} | label4 = Subject | data4 = {{#if:{{{subject|}}} |'''{{{subject}}}'''}} | header5 = {{#if:{{{votemap|}}}|Voting}} | data6 = {{#invoke:InfoboxImage|InfoboxImage|image={{{votemap|}}}|size={{{votemap_size|}}}|sizedefault=230px|alt={{{votemap_alt|}}}}} | label7 = {{#if:{{{votemap|}}}|Summary|{{longitem|Voting summary}}}} | class7 = nowrap | data7 = {{unbulleted list | {{#if:{{{for|}}} |'''{{color|#090|{{#ifeq:{{{for}}}|0 |None | {{{for}}} }} voted for}}'''}}<!-- -->| {{#if:{{{against|}}} |'''{{color|#900|{{#ifeq:{{{against}}}|0 |None | {{{against}}} }} voted against}}'''}}<!-- -->| {{#if:{{{abstention|}}} |'''{{color|#333|{{#ifeq:{{{abstention}}}|0 |None | {{{abstention}}} }} abstained}}'''}}<!-- -->| {{#if:{{{absent|}}} |{{#ifeq:{{{absent}}}|0 |None | {{{absent}}} }} absent}}<!-- -->| {{#if:{{{presentnotvoting|}}} |{{#ifeq:{{{presentnotvoting}}}|0 |None | {{{presentnotvoting}}} }} present not voting}}<!-- -->}} | label8 = Result | data8 = {{{result|}}} | header9 = {{#ifeq:{{{organ|SC}}}|SC |[[United Nations Security Council|Security Council]] composition}} | label10 = {{longitem|Permanent members}} | class10 = nowrap | data10 = {{#ifeq:{{BASEPAGENAME}}|Infobox UN resolution <!--(show current Security Council members on template's own page:)--> | {{ubl |{{flag|China}} |{{flag|France}} |{{flag|Russia}} |{{flag|United Kingdom}} |{{flag|United States}} }} | {{#ifeq:{{{organ|SC}}}|SC | {{#ifexpr:({{{number|0}}})<=(75) | {{ubl |{{flag|Republic of China (1912–1949)|name=China}} |{{flagcountry|French Fourth Republic}} |{{flag|United Kingdom}} |{{flag|United States|1912}} |{{flag|Soviet Union|1936}} }} }} {{#ifexpr:({{{number|0}}})>=(76) and ({{{number|0}}})<=(107) | {{ubl |{{flag|Taiwan|name=China}} |{{flagcountry|French Fourth Republic}} |{{flag|United Kingdom}} |{{flag|United States|1912}} |{{flag|Soviet Union|1936}} }} }} {{#ifexpr:({{{number|0}}})>=(108) and ({{{number|0}}})<=(129) | {{ubl |{{flag|Taiwan|name=China}} |{{flagcountry|French Fourth Republic}} |{{flag|United Kingdom}} |{{flag|United States|1912}} |{{flag|Soviet Union|1955}} }} }} {{#ifexpr:({{{number|0}}})>=(130) and ({{{number|0}}})<=(131) | {{ubl |{{flag|Taiwan|name=China}} |{{flag|France|1794}} |{{flag|United Kingdom}} |{{flag|United States|1912}} |{{flag|Soviet Union|1955}} }} }} {{#ifexpr:({{{number|0}}})>=(132) and ({{{number|0}}})<=(140) | {{ubl |{{flag|Taiwan|name=China}} |{{flag|France|1794}} |{{flag|United Kingdom}} |{{flag|United States|1959}} |{{flag|Soviet Union|1955}} }} }} {{#ifexpr:({{{number|0}}})>=(141) and ({{{number|0}}})<=(301) | {{ubl |{{flag|Taiwan|name=China}} |{{flag|France|1794}} |{{flag|United Kingdom}} |{{flag|United States|1960}} |{{flag|Soviet Union|1955}} }} }} {{#ifexpr:({{{number|0}}})>=(302) and ({{{number|0}}})<=(477) | {{ubl |{{flag|China}} |{{flag|France}} |{{flag|United Kingdom}} |{{flag|United States|1960}} |{{flag|Soviet Union|1955}} }} }} {{#ifexpr:({{{number|0}}})>=(478) and ({{{number|0}}})<=(724) | {{ubl |{{flag|China}} |{{flag|France}} |{{flag|United Kingdom}} |{{flag|United States|1960}} |{{flag|Soviet Union}} }} }} {{#ifexpr:({{{number|0}}})>=(725) and ({{{number|0}}})<=(888) | {{ubl |{{flag|China}} |{{flag|France}} |{{flag|Russia|1991}} |{{flag|United Kingdom}} |{{flag|United States|1960}} }} }} {{#ifexpr:({{{number|0}}})>=(889) | {{ubl |{{flag|China}} |{{flag|France}} |{{flag|Russia}} |{{flag|United Kingdom}} |{{flag|United States}} }} }} }} }} | label11 = {{longitem|{{nowrap|Non-permanent}} members}} | class11 = nowrap | data11 = {{#ifeq:{{{organ|SC}}}|SC | {{#switch:{{{year|}}} | 1946 = {{ubl |{{flag|Australia}} |{{flag|Brazil|1889}} |{{flag|Egypt|1922}} |{{flag|Mexico|1934}} |{{flag|Netherlands}} |{{flagcountry|Polish People's Republic|1947}} }} | 1947 = {{ubl |{{flag|Australia}} |{{flag|Belgium}} |{{flagcountry|Second Brazilian Republic|1946}} |{{flag|Colombia}} |{{flagcountry|Polish People's Republic|1947}} |{{flag|Syria|1932}} }} | 1948 = {{ubl |{{flag|Argentina}} |{{flag|Belgium}} |{{flag|Canada|1921}} |{{flag|Colombia}} |{{flag|Syria|1932}} |{{flag|Ukrainian SSR|1937}} }} | 1949 = {{ubl |{{flag|Argentina}} |{{flag|Canada|1921}} |{{flagcountry|Republic of Cuba (1902–59)}} |{{flag|Egypt|1922}} |{{flag|Norway}} |{{flag|Ukrainian SSR|1937}} }} | 1950 = {{ubl |{{flagcountry|Republic of Cuba (1902–59)}} |{{flag|Ecuador|1900}} |{{flag|Egypt|1922}} |{{flag|India}} |{{flag|Norway}} |{{flag|Socialist Federal Republic of Yugoslavia|name=Yugoslavia}} }} | 1951 = {{ubl |{{flagcountry|Second Brazilian Republic|1946}} |{{flag|Ecuador|1900}} |{{flag|India}} |{{flag|Netherlands}} |{{flag|Turkey}} |{{flag|Socialist Federal Republic of Yugoslavia|name=Yugoslavia}} }} | 1952 = {{ubl |{{flagcountry|Second Brazilian Republic|1946}} |{{flag|Chile}} |{{flag|Greece|1828}} |{{flag|Netherlands}} |{{flag|Pakistan}} |{{flag|Turkey}} }} | 1953 = {{ubl |{{flag|Chile}} |{{flag|Colombia}} |{{flag|Denmark}} |{{flag|Greece|1828}} |{{flag|Lebanon}} |{{flag|Pakistan}} }} | 1954 = {{ubl |{{flagcountry|Second Brazilian Republic|1946}} |{{flag|Colombia}} |{{flag|Denmark}} |{{flag|Lebanon}} |{{flag|New Zealand}} |{{flag|Turkey}} }} | 1955 = {{ubl |{{flag|Belgium}} |{{flagcountry|Second Brazilian Republic|1946}} |{{flagcountry|Pahlavi dynasty|1925}} |{{flag|New Zealand}} |{{flag|Peru}} |{{flag|Turkey}} }} | 1956 = {{ubl |{{flag|Australia}} |{{flag|Belgium}} |{{flagcountry|Republic of Cuba (1902–59)}} |{{flagcountry|Pahlavi dynasty|1925}} |{{flag|Peru}} |{{flag|Socialist Federal Republic of Yugoslavia|name=Yugoslavia}} }} | 1957 = {{ubl |{{flag|Australia}} |{{flag|Colombia}} |{{flagcountry|Republic of Cuba (1902–59)}} |{{flagcountry|Kingdom of Iraq}} |{{flag|Philippines|1936}} |{{flag|Sweden}} }} | 1958 = {{ubl |{{flag|Canada|1957}} |{{flag|Colombia}} |{{flagcountry|Kingdom of Iraq}} |{{flag|Japan|1947}} |{{flag|Panama}} |{{flag|Sweden}} }} | 1959 = {{ubl |{{flag|Argentina}} |{{flag|Canada|1957}} |{{flag|Italy}} |{{flag|Japan|1947}} |{{flag|Panama}} |{{flag|Tunisia}} }} | 1960 = {{ubl |{{flag|Argentina}} |{{flag|Ceylon}} |{{flag|Ecuador|1900}} |{{flag|Italy}} |{{flagcountry|Polish People's Republic|1947}} |{{flag|Tunisia}} }} | 1961 = {{ubl |{{flag|Ceylon}} |{{flag|Chile}} |{{flag|Ecuador|1900}} |{{flag|Liberia}} |{{flag|Turkey}} |{{flag|United Arab Republic}} }} | 1962 = {{ubl |{{flag|Chile}} |{{flag|Ghana}} |{{flag|Republic of Ireland|name=Ireland}} |{{flagcountry|Socialist Republic of Romania|1952}} |{{flag|United Arab Republic}} |{{flag|Venezuela|1954}} }} | 1963 = {{ubl |{{flagcountry|Second Brazilian Republic}} |{{flag|Ghana}} |{{flag|Morocco}} |{{flag|Norway}} |{{flag|Philippines|1936}} |{{flag|Venezuela|1954}} }} | 1964 = {{ubl |{{flag|Bolivia}} |{{flag|Brazil|1960}} |{{flagcountry|Czechoslovak Socialist Republic}} |{{flag|Ivory Coast}} |{{flag|Morocco}} |{{flag|Norway}} }} | 1965 = {{ubl |{{flag|Bolivia}} |{{flag|Ivory Coast}} |{{flag|Jordan}} |{{flag|Malaysia}} |{{flag|Netherlands}} |{{flag|Uruguay}} }} | 1966 = {{ubl |{{flag|Argentina}} |{{flagcountry|People's Republic of Bulgaria|1946}} |{{flag|Japan|1947}} |{{flag|Jordan}} |{{flag|Mali}} |{{flag|Netherlands}} |{{flag|New Zealand}} |{{flag|Nigeria}} |{{flag|Uganda}} |{{flag|Uruguay}} }} | 1967 = {{ubl |{{flag|Argentina}} |{{flagcountry|Brazilian military government|1960}} |{{flagcountry|People's Republic of Bulgaria|1946}} |{{flag|Canada}} |{{flag|Denmark}} |{{flag|Ethiopia|1897}} |{{flag|India}} |{{flag|Japan|1947}} |{{flag|Mali}} |{{flag|Nigeria}} }} | 1968 = {{ubl |{{flag|Algeria}} |{{flagcountry|Brazilian military government|1960}} |{{flag|Canada}} |{{flag|Denmark}} |{{flag|Ethiopia|1897}} |{{flagcountry|Hungarian People's Republic}} |{{flag|India}} |{{flag|Pakistan}} |{{flag|Paraguay}} |{{flag|Senegal}} }} | 1969 = {{ubl |{{flag|Algeria}} |{{flag|Colombia}} |{{flag|Finland}} |{{flagcountry|Hungarian People's Republic}} |{{flag|Nepal}} |{{flag|Pakistan}} |{{flag|Paraguay}} |{{flag|Senegal}} |{{flag|Spain|1945}} |{{flag|Zambia|1964}} }} | 1970 = {{ubl |{{flag|Burundi}} |{{flag|Colombia}} |{{flag|Finland}} |{{flag|Nepal}} |{{flag|Nicaragua}} |{{flagcountry|Polish People's Republic|1947}} |{{flag|Sierra Leone}} |{{flag|Spain|1945}} |{{flag|Syria|1963}} |{{flag|Zambia|1964}} }} | 1971 = {{ubl |{{flag|Argentina}} |{{flag|Belgium}} |{{flag|Burundi}} |{{flag|Italy}} |{{flag|Japan|1947}} |{{flag|Nicaragua}} |{{flagcountry|Polish People's Republic|1947}} |{{flag|Sierra Leone}} |{{flag|Somalia}} |{{flag|Syria|1963}} }} | 1972 = {{ubl |{{flag|Argentina}} |{{flag|Belgium}} |{{flag|Guinea}} |{{flag|India}} |{{flag|Italy}} |{{flag|Japan|1947}} |{{flag|Panama}} |{{flag|Somalia}} |{{flag|Sudan}} |{{flag|Socialist Federal Republic of Yugoslavia|name=Yugoslavia}} }} | 1973 = {{ubl |{{flag|Australia}} |{{flag|Austria}} |{{flag|Guinea}} |{{flag|India}} |{{flag|Indonesia}} |{{flag|Kenya}} |{{flag|Panama}} |{{flag|Peru}} |{{flag|Sudan}} |{{flag|Socialist Federal Republic of Yugoslavia|name=Yugoslavia}} }} | 1974 = {{ubl |{{flag|Australia}} |{{flag|Austria}} |{{flag|Byelorussian SSR}} |{{flag|Cameroon}} |{{flag|Costa Rica}} |{{flag|Indonesia}} |{{flagdeco|Iraq|1963}} [[Ba'athist Iraq|Iraq]] |{{flag|Kenya}} |{{flag|Mauritania|1959}} |{{flag|Peru}} }} | 1975 = {{ubl |{{flag|Byelorussian SSR}} |{{flag|Cameroon}} |{{flag|Costa Rica}} |{{flag|Guyana}} |{{flagdeco|Iraq|1963}} [[Ba'athist Iraq|Iraq]] |{{flag|Italy}} |{{flag|Japan|1947}} |{{flag|Mauritania|1959}} |{{flag|Sweden}} |{{flag|Tanzania}} }} | 1976 = {{ubl |{{flag|Benin|1975}} |{{flag|Guyana}} |{{flag|Italy}} |{{flag|Japan|1947}} |{{flag|Libya|1972}} |{{flag|Pakistan}} |{{flag|Panama}} |{{flagcountry|Socialist Republic of Romania|1965}} |{{flag|Sweden}} |{{flag|Tanzania}} }} | 1977 = {{ubl |{{flag|Benin|1975}} |{{flag|Canada}} |{{flag|India}} |{{#ifexpr:({{{number|0}}})>=(403) and ({{{number|0}}})<=(404)|{{flag|Libya|1972}} }} {{#ifexpr:({{{number|0}}})>=(405) and ({{{number|0}}})<=(422)|{{flag|Libya|1977}} }} |{{flag|Mauritania|1959}} |{{flag|Pakistan}} |{{flag|Panama}} |{{flagcountry|Socialist Republic of Romania|1965}} |{{flag|Venezuela|1954}} |{{flag|West Germany}} }} | 1978 = {{ubl |{{flag|Bolivia}} |{{flag|Canada}} |{{flagcountry|Czechoslovak Socialist Republic}} |{{flag|Gabon}} |{{flag|India}} |{{flag|Kuwait}} |{{flag|Mauritania|1959}} |{{flag|Nigeria}} |{{flag|Venezuela|1954}} |{{flag|West Germany}} }} | 1979 = {{ubl |{{flag|Bangladesh}} |{{flag|Bolivia}} |{{flagcountry|Czechoslovak Socialist Republic}} |{{flag|Gabon}} |{{flag|Jamaica}} |{{flag|Kuwait}} |{{flag|Nigeria}} |{{flag|Norway}} |{{flag|Portugal}} |{{flag|Zambia|1964}} }} | 1980 = {{ubl |{{flag|Bangladesh}} |{{flag|East Germany}} |{{flag|Jamaica}} |{{flag|Mexico|1968}} |{{flag|Niger}} |{{flag|Norway}} |{{flag|Philippines|1936}} |{{flag|Portugal}} |{{flag|Tunisia}} |{{flag|Zambia|1964}} }} | 1981 = {{ubl |{{flag|East Germany}} |{{flag|Republic of Ireland|name=Ireland}} |{{flag|Japan|1947}} |{{flag|Mexico|1968}} |{{flag|Niger}} |{{flag|Panama}} |{{flag|Philippines|1936}} |{{flag|Spain|1977}} |{{flag|Tunisia}} |{{flag|Uganda}} }} | 1982 = {{ubl |{{flag|Guyana}} |{{flag|Republic of Ireland|name=Ireland}} |{{flag|Jordan}} |{{flag|Japan|1947}} |{{flag|Panama}} |{{flagcountry|Polish People's Republic}} |{{flag|Spain}} |{{flag|Togo}} |{{flag|Uganda}} |{{flag|Zaire}} }} | 1983 = {{ubl |{{flag|Guyana}} |{{flag|Jordan}} |{{flag|Malta}} |{{flag|Netherlands}} |{{flag|Nicaragua}} |{{flag|Pakistan}} |{{flagcountry|Polish People's Republic}} |{{flag|Togo}} |{{flag|Zaire}} |{{flag|Zimbabwe}} }} | 1984 = {{ubl |{{#ifexpr:({{{number|0}}})>=(554) and ({{{number|0}}})<=(559)|{{flag|Burkina Faso}} }} |{{#ifexpr:({{{number|0}}})>=(546) and ({{{number|0}}})<=(554)|{{flag|Egypt|1972}} }} {{#ifexpr:({{{number|0}}})>=(555) and ({{{number|0}}})<=(559)|{{flag|Egypt}} }} |{{flag|India}} |{{flag|Malta}} |{{flag|Netherlands}} |{{flag|Nicaragua}} |{{flag|Pakistan}} |{{flag|Peru}} |{{flag|Ukrainian SSR}} |{{#ifexpr:({{{number|0}}})>=(546) and ({{{number|0}}})<=(553)|{{flag|Upper Volta}} }} |{{flag|Zimbabwe}} }} | 1985 = {{ubl |{{flag|Australia}} |{{flag|Burkina Faso}} |{{flag|Denmark}} |{{flag|Egypt}} |{{flag|India}} |{{flag|Madagascar}} |{{flag|Peru}} |{{flag|Thailand}} |{{flag|Trinidad and Tobago}} |{{flag|Ukrainian SSR}} }} | 1986 = {{ubl |{{flag|Australia}} |{{flagcountry|People's Republic of Bulgaria}} |{{flag|People's Republic of the Congo|name=Rep. of the Congo}} |{{flag|Denmark}} |{{flag|Ghana}} |{{flag|Madagascar}} |{{flag|Thailand}} |{{flag|Trinidad and Tobago}} |{{flag|United Arab Emirates}} |{{flag|Venezuela|1954}} }} | 1987 = {{ubl |{{flag|Argentina}} |{{flagcountry|People's Republic of Bulgaria}} |{{flag|People's Republic of the Congo|name=Rep. of the Congo}} |{{flag|Ghana}} |{{flag|Italy}} |{{flag|Japan|1947}} |{{flag|United Arab Emirates}} |{{flag|Venezuela|1954}} |{{flag|West Germany}} |{{flag|Zambia|1964}} }} | 1988 = {{ubl |{{flag|Algeria}} |{{flag|Argentina}} |{{flag|Brazil|1968}} |{{flag|Italy}} |{{flag|Japan|1947}} |{{flag|Nepal}} |{{flag|Senegal}} |{{flag|West Germany}} |{{flag|Socialist Federal Republic of Yugoslavia|name=Yugoslavia}} |{{flag|Zambia|1964}} }} | 1989 = {{ubl |{{flag|Algeria}} |{{flag|Brazil|1968}} |{{flag|Canada}} |{{flag|Colombia}} |{{flag|Ethiopia|1987}} |{{flag|Finland}} |{{flag|Malaysia}} |{{flag|Nepal}} |{{flag|Senegal}} |{{flag|Socialist Federal Republic of Yugoslavia|name=Yugoslavia}} }} | 1990 = {{ubl |{{flag|Canada}} |{{flag|Colombia}} |{{flag|Cuba}} |{{flag|Ethiopia|1987}} |{{flag|Finland}} |{{flag|Ivory Coast}} |{{flag|Malaysia}} |{{flag|Romania}} |{{#ifexpr:({{{number|0}}})>=(647) and ({{{number|0}}})<=(654)|{{flag|South Yemen}} }} {{#ifexpr:({{{number|0}}})>=(655) and ({{{number|0}}})<=(683)|{{flag|Yemen}} }} |{{flag|Zaire}} }} | 1991 = {{ubl |{{flag|Austria}} |{{flag|Belgium}} |{{flag|Cuba}} |{{flag|Ecuador|1900}} |{{flag|India}} |{{flag|Ivory Coast}} |{{flag|Romania}} |{{flag|Yemen}} |{{flag|Zaire}} |{{flag|Zimbabwe}} }} | 1992 = {{ubl |{{flag|Austria}} |{{flag|Belgium}} |{{flag|Cape Verde}} |{{flag|Ecuador|1900}} |{{flag|Hungary}} |{{flag|India}} |{{flag|Japan|1947}} |{{flag|Morocco}} |{{flag|Venezuela|1954}} |{{flag|Zimbabwe}} }} | 1993 = {{ubl |{{flag|Brazil}} |{{flag|Cape Verde}} |{{flag|Djibouti}} |{{flag|Hungary}} |{{flag|Japan|1947}} |{{flag|Morocco}} |{{flag|New Zealand}} |{{flag|Pakistan}} |{{flag|Spain}} |{{flag|Venezuela|1954}} }} | 1994 = {{ubl |{{flag|Argentina}} |{{flag|Brazil}} |{{flag|Czech Republic}} |{{flag|Djibouti}} |{{flag|New Zealand}} |{{flag|Nigeria}} |{{flag|Oman|1970}} |{{flag|Pakistan}} |{{flag|Rwanda|1962}} |{{flag|Spain}} }} | 1995 = {{ubl |{{flag|Argentina}} |{{flag|Botswana}} |{{flag|Czech Republic}} |{{flag|Germany}} |{{flag|Honduras|1949}} |{{flag|Indonesia}} |{{flag|Italy}} |{{flag|Nigeria}} |{{flag|Oman}} |{{flag|Rwanda|1962}} }} | 1996 = {{ubl |{{flag|Botswana}} |{{flag|Chile}} |{{flag|Egypt}} |{{flag|Guinea-Bissau}} |{{flag|Germany}} |{{flag|Honduras|1949}} |{{flag|Indonesia}} |{{flag|Italy}} |{{flag|South Korea|1984}} |{{flag|Poland}} }} | 1997 = {{ubl |{{flag|Chile}} |{{flag|Costa Rica}} |{{flag|Egypt}} |{{flag|Guinea-Bissau}} |{{flag|Japan|1947}} |{{flag|Kenya}} |{{flag|South Korea|1984}} |{{flag|Poland}} |{{flag|Portugal}} |{{flag|Sweden}} }} | 1998 = {{ubl |{{flag|Bahrain|1972}} |{{flag|Brazil}} |{{flag|Costa Rica}} |{{flag|Gabon}} |{{flag|Gambia}} |{{flag|Japan|1947}} |{{flag|Kenya}} |{{flag|Portugal}} |{{flag|Slovenia}} |{{flag|Sweden}} }} | 1999 = {{ubl |{{flag|Argentina}} |{{flag|Bahrain|1972}} |{{flag|Brazil}} |{{flag|Canada}} |{{flag|Gabon}} |{{flag|Gambia}} |{{flag|Malaysia}} |{{flag|Namibia}} |{{flag|Netherlands}} |{{flag|Slovenia}} }} | 2000 = {{ubl |{{flag|Argentina}} |{{flag|Bangladesh}} |{{flag|Canada}} |{{flag|Jamaica}} |{{flag|Malaysia}} |{{flag|Mali}} |{{flag|Namibia}} |{{flag|Netherlands}} |{{flag|Tunisia}} |{{flag|Ukraine}} }} | 2001 = {{ubl |{{flag|Bangladesh}} |{{flag|Colombia}} |{{flag|Republic of Ireland|name=Ireland}} |{{flag|Jamaica}} |{{flag|Mali}} |{{flag|Mauritius}} |{{flag|Norway}} |{{flag|Singapore}} |{{flag|Tunisia}} |{{flag|Ukraine}} }} | 2002 = {{ubl |{{flag|Bulgaria}} |{{flag|Cameroon}} |{{flag|Colombia}} |{{flag|Guinea}} |{{flag|Republic of Ireland|name=Ireland}} |{{flag|Mauritius}} |{{flag|Mexico|1968}} |{{flag|Norway}} |{{flag|Singapore}} |{{flag|Syria}} }} | 2003 = {{ubl |{{flag|Angola}} |{{flag|Bulgaria}} |{{flag|Chile}} |{{flag|Cameroon}} |{{flag|Germany}} |{{flag|Guinea}} |{{flag|Mexico|1968}} |{{flag|Pakistan}} |{{flag|Spain}} |{{flag|Syria}} }} | 2004 = {{ubl |{{flag|Algeria}} |{{flag|Angola}} |{{flag|Benin}} |{{flag|Brazil}} |{{flag|Chile}} |{{flag|Germany}} |{{flag|Pakistan}} |{{flag|Philippines}} |{{flag|Romania}} |{{flag|Spain}} }} | 2005 = {{ubl |{{flag|Algeria}} |{{flag|Argentina}} |{{flag|Benin}} |{{flag|Brazil}} |{{flag|Denmark}} |{{flag|Greece}} |{{flag|Japan}} |{{flag|Philippines}} |{{flag|Romania}} |{{flag|Tanzania}} }} | 2006 = {{ubl |{{flag|Argentina}} |{{flag|Republic of the Congo|name=Rep. of the Congo}} |{{flag|Denmark}} |{{flag|Ghana}} |{{flag|Greece}} |{{flag|Japan}} |{{flag|Peru}} |{{flag|Qatar}} |{{flag|Slovakia}} |{{flag|Tanzania}} }} | 2007 = {{ubl |{{flag|Belgium}} |{{flag|Republic of the Congo|name=Rep. of the Congo}} |{{flag|Ghana}} |{{flag|Indonesia}} |{{flag|Italy}} |{{flag|Panama}} |{{flag|Peru}} |{{flag|Qatar}} |{{flag|South Africa|1994}} |{{flag|Slovakia}} }} | 2008 = {{ubl |{{flag|Burkina Faso}} |{{flag|Belgium}} |{{flag|Costa Rica}} |{{flag|Croatia}} |{{flag|Indonesia}} |{{flag|Italy}} |{{flag|Libya|1977}} |{{flag|Panama}} |{{flag|South Africa|1994}} |{{flag|Vietnam}} }} | 2009 = {{ubl |{{flag|Austria}} |{{flag|Burkina Faso}} |{{flag|Costa Rica}} |{{flag|Croatia}} |{{flag|Japan}} |{{flag|Libya|1977}} |{{flag|Mexico|1968}} |{{flag|Turkey}} |{{flag|Uganda}} |{{flag|Vietnam}} }} | 2010 = {{ubl |{{flag|Austria}} |{{flag|Bosnia and Herzegovina|name=Bosnia–Herzegovina}} |{{flag|Brazil}} |{{flag|Gabon}} |{{flag|Japan}} |{{flag|Lebanon}} |{{flag|Mexico|1968}} |{{flag|Nigeria}} |{{flag|Turkey}} |{{flag|Uganda}} }} | 2011 = {{ubl |{{flag|Bosnia and Herzegovina|name=Bosnia–Herzegovina}} |{{flag|Brazil}} |{{flag|Colombia}} |{{flag|Germany}} |{{flag|Gabon}} |{{flag|India}} |{{flag|Lebanon}} |{{flag|Nigeria}} |{{flag|Portugal}} |{{flag|South Africa|1994}} }} | 2012 = {{ubl |{{flag|Azerbaijan}} |{{flag|Colombia}} |{{flag|Germany}} |{{flag|Guatemala}} |{{flag|India}} |{{flag|Morocco}} |{{flag|Pakistan}} |{{flag|Portugal}} |{{flag|South Africa|1994}} |{{flag|Togo}} }} | 2013 = {{ubl |{{flag|Argentina}} |{{flag|Australia}} |{{flag|Azerbaijan}} |{{flag|Guatemala}} |{{flag|South Korea}} |{{flag|Luxembourg}} |{{flag|Morocco}} |{{flag|Pakistan}} |{{flag|Rwanda}} |{{flag|Togo}} }} | 2014 = {{ubl |{{flag|Argentina}} |{{flag|Australia}} |{{flag|Chad}} |{{flag|Chile}} |{{flag|Jordan}} |{{flag|Lithuania}} |{{flag|Luxembourg}} |{{flag|Nigeria}} |{{flag|Rwanda}} |{{flag|South Korea}} }} | 2015 = {{ubl |{{flag|Angola}} |{{flag|Chad}} |{{flag|Chile}} |{{flag|Jordan}} |{{flag|Lithuania}} |{{flag|Malaysia}} |{{flag|New Zealand}} |{{flag|Nigeria}} |{{flag|Spain}} |{{flag|Venezuela}} }} | 2016 = {{ubl |{{flag|Angola}} |{{flag|Egypt}} |{{flag|Japan}} |{{flag|Malaysia}} |{{flag|New Zealand}} |{{flag|Senegal}} |{{flag|Spain}} |{{flag|Ukraine}} |{{flag|Uruguay}} |{{flag|Venezuela}} }} | 2017 = {{ubl |{{flag|Bolivia}} |{{flag|Egypt}} |{{flag|Ethiopia}} |{{flag|Italy}} |{{flag|Japan}} |{{flag|Kazakhstan}} |{{flag|Senegal}} |{{flag|Sweden}} |{{flag|Ukraine}} |{{flag|Uruguay}} }} | 2018 = {{ubl |{{flag|Bolivia}} |{{flag|Equatorial Guinea}} |{{flag|Ethiopia}} |{{flag|Ivory Coast}} |{{flag|Kazakhstan}} |{{flag|Kuwait}} |{{flag|Netherlands}} |{{flag|Peru}} |{{flag|Poland}} |{{flag|Sweden}} }} | 2019 = {{ubl |{{flag|Belgium}} |{{flag|Dominican Republic}} |{{flag|Equatorial Guinea}} |{{flag|Germany}} |{{flag|Indonesia}} |{{flag|Ivory Coast}} |{{flag|Kuwait}} |{{flag|Peru}} |{{flag|Poland}} |{{flag|South Africa}} }} | 2020 = {{ubl |{{flag|Belgium}} |{{flag|Dominican Republic}} |{{flag|Estonia}} |{{flag|Germany}} |{{flag|Indonesia}} |{{flag|Niger}} |{{flag|Saint Vincent and the Grenadines|name=St.Vincent–Grenadines}} |{{flag|South Africa}} |{{flag|Tunisia}} |{{flag|Vietnam}} }} | 2021 = {{ubl |{{flag|Estonia}} |{{flag|India}} |{{flag|Ireland}} |{{flag|Kenya}} |{{flag|Mexico}} |{{flag|Niger}} |{{flag|Norway}} |{{flag|Saint Vincent and the Grenadines|name=St.Vincent–Grenadines}} |{{flag|Tunisia}} |{{flag|Vietnam}} }} | 2022 = {{ubl |{{flag|Albania}} |{{flag|Brazil}} |{{flag|Gabon}} |{{flag|Ghana}} |{{flag|India}} |{{flag|Ireland}} |{{flag|Kenya}} |{{flag|Mexico}} |{{flag|Norway}} |{{flag|United Arab Emirates}} }} | 2023 = {{ubl |{{flag|Albania}} |{{flag|Brazil}} |{{flag|Ecuador}} |{{flag|Gabon}} |{{flag|Ghana}} |{{flag|Japan}} |{{flag|Malta}} |{{flag|Mozambique}} |{{flag|Switzerland}} |{{flag|United Arab Emirates}} }} | #default = {{#ifeq:{{BASEPAGENAME}}|Infobox UN resolution |{{longitem|''automatically filled<br/>according to year''}} }} }} }} }}</includeonly>{{#invoke:Check for unknown parameters | check | unknown={{main other|[[Category:Pages using infobox UN resolution with unknown parameters|_VALUE_{{PAGENAME}}]]}} | preview=Page using [[Template:Infobox UN resolution]] with unknown parameter "_VALUE_" | ignoreblank=y | absent | abstention | against | alt | caption | code | date | document | for | image | image_alt | image_size | meeting | number | organ | presentnotvoting | result | subject | votemap | votemap_alt | votemap_size | width | year }}<noinclude>{{Documentation}}</noinclude> f110944eee6306518ca0e38b14a94836f6d895ff Template:Country data Russia 10 149 360 2022-07-28T14:40:08Z wikipedia>Primefac 0 partial revert - this isn't accurate, but it's more accurate than showing the Russian flag for these particular events wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Russia | flag alias = Flag of Russia.svg | flag alias-1668 = Flag of Russia (1668).svg | flag alias-1696 = Flag of Russia.svg | flag alias-1721 = Flag of Oryol (variant).svg | flag alias-1858 = Romanov Flag.svg | flag alias-1914 = Flag of Russian Empire (1914-1917).svg | flag alias-1918a=Flag of Russia (1918).svg | flag alias-1918 = Flag of Russia (1918–1920).svg | flag alias-1925 = Flag of the Russian SFSR (1920-1937).svg | flag alias-1937 = Flag of the Russian SFSR (1937-1954).svg | flag alias-1954 = Flag of the Russian SFSR.svg | flag alias-1991 = Flag of Russia (1991–1993).svg | flag alias-military = Banner of the Armed Forces of the Russian Federation (obverse).svg | link alias-military = Russian Armed Forces | flag alias-army = Flag of the Russian ground forces.svg | link alias-army = Russian Ground Forces | flag alias-naval = Naval Jack of Russia.svg | link alias-naval = Russian Navy | flag alias-navy = Naval Ensign of Russia.svg | link alias-navy = Russian Navy | flag alias-air force = Flag of the Air Force of the Russian Federation.svg | link alias-air force = Russian Air Force | flag alias-marines = Флаг Морской пехоты ВМФ России (2021).jpg | link alias-marines = Russian Naval Infantry | flag alias-space force = Russian military space troops flag.svg | link alias-space force = Russian Space Forces | flag alias-coast guard = Russia, Flag of border service 2008.svg | link alias-coast guard = Coast Guard of the Border Service of the FSB | flag alias-roc-olympics = Olympic flag.svg | flag alias-rpc-paralympics = Russian Paralympic Committee flag (2021).svg | flag alias-nbfr-badminton = Nbfr logo.png | flag alias-rwf-wrestling = RWF logo.svg | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1668 | var2 = 1696 | var3 = 1721 | var4 = 1858 | var5 = 1914 | var6 = 1918a | var7 = 1918 | var8 = 1925 | var9 = 1937 | var10 = 1954 | var11 = 1991 | var12 = roc-olympics | var13 = rpc-paralympics | var14 = nbfr-badminton | var15 = rwf-wrestling | redir1 = RUS | redir2 = Russian Federation </noinclude> }} 1c223d68d6a2b82b579c20c75800ebc6fa57e066 Template:Country data China 10 135 332 2022-07-30T13:40:30Z wikipedia>Pppery 0 Per edit request wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = China | flag alias = Flag of the People's Republic of China.svg | flag alias-1862 = Flag of the Qing Dynasty (1862-1889).svg | border-1862 = | flag alias-1889 = Flag of the Qing Dynasty (1889-1912).svg | flag alias-Qing = Flag of the Qing Dynasty (1889-1912).svg | flag alias-1912 = Flag of China (1912–1928).svg | flag alias-1928 = Flag of the Republic of China.svg | flag alias-military = People's Liberation Army Flag of the People's Republic of China.svg | link alias-military = People's Liberation Army | flag alias-coast guard=Flag of China.svg | link alias-coast guard=China Coast Guard | flag alias-army = Ground Force Flag of the People's Republic of China.svg | link alias-army = People's Liberation Army Ground Force | flag alias-marines=Naval ensign of China.svg | link alias-marines=People's Liberation Army Navy Marine Corps | flag alias-navy = Naval ensign of China.svg | link alias-navy = People's Liberation Army Navy | flag alias-naval = Naval ensign of China.svg | link alias-naval = People's Liberation Army Navy | flag alias-air force = Air Force Flag of the People's Republic of China.svg | link alias-air force = People's Liberation Army Air Force | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | altvar = {{{altvar|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1862 | var2 = 1889 | var3 = 1912 | var4 = 1928 | redir1 = CHN | redir2 = People's Republic of China | redir3 = China, People's Republic of | redir4 = China (People's Republic of) | redir5 = PRC | related1 = Qing dynasty | related2 = Republic of China | related3 = Republic of China (1912–1949) </noinclude> }} a78d324a5b210f7474f249ada57c4c17c25d25b9 Module:Transclusion count/data/C 828 128 314 2022-07-31T05:10:21Z en>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["C"] = 598000, ["C-Class"] = 76000, ["C-SPAN"] = 12000, ["C-cmn"] = 2500, ["C-pl"] = 52000, ["C."] = 2400, ["CAN"] = 20000, ["CANelec"] = 13000, ["CANelec/gain"] = 2500, ["CANelec/hold"] = 4500, ["CANelec/source"] = 6500, ["CANelec/top"] = 5600, ["CANelec/total"] = 5700, ["CAS"] = 3800, ["CBB_Standings_End"] = 14000, ["CBB_Standings_Entry"] = 14000, ["CBB_Standings_Start"] = 14000, ["CBB_Yearly_Record_End"] = 2800, ["CBB_Yearly_Record_Entry"] = 2900, ["CBB_Yearly_Record_Start"] = 2800, ["CBB_Yearly_Record_Subhead"] = 3400, ["CBB_Yearly_Record_Subtotal"] = 2700, ["CBB_roster/Footer"] = 6900, ["CBB_roster/Header"] = 6900, ["CBB_roster/Player"] = 6900, ["CBB_schedule_end"] = 9600, ["CBB_schedule_entry"] = 9700, ["CBB_schedule_start"] = 9700, ["CBB_yearly_record_end"] = 3800, ["CBB_yearly_record_end/legend"] = 3400, ["CBB_yearly_record_entry"] = 3800, ["CBB_yearly_record_start"] = 3700, ["CBB_yearly_record_subhead"] = 3500, ["CBB_yearly_record_subtotal"] = 3600, ["CBSB_Standings_End"] = 4000, ["CBSB_Standings_Entry"] = 4000, ["CBSB_Standings_Start"] = 4000, ["CBSB_link"] = 3300, ["CC0"] = 4500, ["CENTURY"] = 16000, ["CFB_Standings_End"] = 32000, ["CFB_Standings_Entry"] = 32000, ["CFB_Standings_Start"] = 32000, ["CFB_Yearly_Record_End"] = 6400, ["CFB_Yearly_Record_End/legend"] = 2300, ["CFB_Yearly_Record_Entry"] = 6400, ["CFB_Yearly_Record_Start"] = 6400, ["CFB_Yearly_Record_Subhead"] = 6400, ["CFB_Yearly_Record_Subtotal"] = 6300, ["CFB_schedule"] = 24000, ["CFB_schedule_entry"] = 17000, ["CFL_Year"] = 5400, ["CGF_year"] = 2500, ["CHE"] = 10000, ["CHI"] = 2800, ["CHL"] = 3600, ["CHN"] = 11000, ["CN"] = 2300, ["CO2"] = 2200, ["COI"] = 14000, ["COIUL"] = 124000, ["COI_editnotice"] = 6300, ["COL"] = 4700, ["COLON"] = 13000, ["CRI"] = 2100, ["CRO"] = 4000, ["CSK"] = 2800, ["CSS_image_crop"] = 3900, ["CUB"] = 3500, ["CURRENTDATE"] = 3600, ["CURRENTISOYEAR"] = 2100, ["CURRENTMINUTE"] = 2500, ["CZE"] = 14000, ["Calendar"] = 2400, ["California/color"] = 11000, ["Call_sign_disambiguation"] = 2900, ["Campaignbox"] = 21000, ["CanProvName"] = 12000, ["CanadaByProvinceCatNav"] = 9700, ["CanadaProvinceThe"] = 3900, ["Canadian_English"] = 5200, ["Canadian_Parliament_links"] = 5100, ["Canadian_election_result"] = 13000, ["Canadian_election_result/gain"] = 2500, ["Canadian_election_result/hold"] = 4600, ["Canadian_election_result/source"] = 7600, ["Canadian_election_result/top"] = 12000, ["Canadian_election_result/top/ElectionYearTest"] = 5300, ["Canadian_election_result/total"] = 9700, ["Canadian_party_colour"] = 7500, ["Canadian_party_colour/colour"] = 16000, ["Canadian_party_colour/colour/default"] = 16000, ["Canadian_party_colour/name"] = 14000, ["Canadian_party_colour/name/default"] = 6100, ["Canned_search"] = 4000, ["Cascite"] = 15000, ["Caselaw_source"] = 3900, ["Cast_listing"] = 11000, ["Cat"] = 295000, ["CatAutoTOC"] = 626000, ["CatAutoTOC/core"] = 625000, ["CatRel"] = 3800, ["CatTrack"] = 3100, ["Cat_class"] = 6600, ["Cat_in_use"] = 50000, ["Cat_main"] = 176000, ["Cat_more"] = 108000, ["Cat_more_if_exists"] = 44000, ["Cat_see_also"] = 3400, ["Catalog_lookup_link"] = 488000, ["Category"] = 235000, ["Category-Class"] = 14000, ["Category-inline"] = 8600, ["Category_TOC"] = 71000, ["Category_TOC/tracking"] = 71000, ["Category_U.S._State_elections_by_year"] = 7300, ["Category_U.S._State_elections_by_year/core"] = 7200, ["Category_class"] = 35000, ["Category_class/column"] = 35000, ["Category_class/second_row_column"] = 35000, ["Category_described_in_year"] = 5700, ["Category_diffuse"] = 7600, ["Category_disambiguation"] = 2300, ["Category_disambiguation/category_link"] = 2300, ["Category_explanation"] = 75000, ["Category_handler"] = 3220000, ["Category_ifexist"] = 4800, ["Category_importance"] = 10000, ["Category_importance/column"] = 10000, ["Category_importance/second_row_column"] = 10000, ["Category_link"] = 348000, ["Category_link_with_count"] = 5800, ["Category_ordered_by_date"] = 9800, ["Category_other"] = 851000, ["Category_redirect"] = 103000, ["Category_see_also"] = 33000, ["Category_see_also/Category_pair_check"] = 33000, ["Category_see_also_if_exists"] = 71000, ["Category_see_also_if_exists_2"] = 84000, ["Category_title"] = 2400, ["Catexp"] = 7100, ["CathEncy"] = 2300, ["Catholic"] = 4200, ["Catholic_Encyclopedia"] = 5100, ["Catmain"] = 25000, ["Catmore"] = 9400, ["Caution"] = 2100, ["Cbb_link"] = 7700, ["Cbignore"] = 97000, ["Cbsb_link"] = 2000, ["Cc-by-2.5"] = 4300, ["Cc-by-3.0"] = 9700, ["Cc-by-sa-2.5"] = 3000, ["Cc-by-sa-2.5,2.0,1.0"] = 3100, ["Cc-by-sa-3.0"] = 29000, ["Cc-by-sa-3.0,2.5,2.0,1.0"] = 2700, ["Cc-by-sa-3.0-migrated"] = 28000, ["Cc-by-sa-4.0"] = 12000, ["Cc-zero"] = 4400, ["CensusAU"] = 10000, ["Census_2016_AUS"] = 7900, ["Cent"] = 5400, ["Center"] = 248000, ["Centralized_discussion"] = 5700, ["Centralized_discussion/core"] = 5700, ["Centralized_discussion/styles.css"] = 5700, ["Centre"] = 2600, ["Century"] = 2000, ["Century_name_from_decade_or_year"] = 72000, ["Century_name_from_title_decade"] = 7300, ["Century_name_from_title_year"] = 7100, ["Certification_Cite/Title"] = 26000, ["Certification_Cite/URL"] = 29000, ["Certification_Cite/archivedate"] = 5500, ["Certification_Cite/archiveurl"] = 5500, ["Certification_Cite_Ref"] = 26000, ["Certification_Table_Bottom"] = 25000, ["Certification_Table_Entry"] = 26000, ["Certification_Table_Entry/Foot"] = 25000, ["Certification_Table_Entry/Foot/helper"] = 25000, ["Certification_Table_Entry/Region"] = 26000, ["Certification_Table_Entry/Sales"] = 25000, ["Certification_Table_Entry/Sales/DanishPeriod"] = 2800, ["Certification_Table_Entry/Sales/DanishPeriodHelper1"] = 2800, ["Certification_Table_Entry/Sales/DanishPeriodHelper2"] = 2800, ["Certification_Table_Entry/Sales/GermanPeriod"] = 3200, ["Certification_Table_Entry/Sales/ItalianHelper"] = 2900, ["Certification_Table_Top"] = 27000, ["Cfb_link"] = 23000, ["Cfd_result"] = 2400, ["Cfdend"] = 4000, ["Chart"] = 4600, ["Chart/end"] = 4600, ["Chart/start"] = 4600, ["Chart_bottom"] = 3000, ["Chart_top"] = 3000, ["Check_completeness_of_transclusions"] = 6400, ["Check_talk"] = 27000, ["Check_talk_wp"] = 1380000, ["Check_winner_by_scores"] = 13000, ["CheckedSockpuppet"] = 7100, ["Checked_sockpuppet"] = 18000, ["Checkedsockpuppet"] = 5300, ["Checkip"] = 12000, ["Checkuser"] = 71000, ["Checkuserblock-account"] = 9400, ["Chem"] = 4700, ["Chem/atom"] = 4600, ["Chem/link"] = 4700, ["Chem2"] = 2100, ["Chem_molar_mass"] = 17000, ["Chem_molar_mass/format"] = 17000, ["Chembox"] = 13000, ["Chembox/styles.css"] = 13000, ["Chembox_3DMet"] = 13000, ["Chembox_3DMet/format"] = 13000, ["Chembox_AllOtherNames"] = 12000, ["Chembox_AllOtherNames/format"] = 12000, ["Chembox_Appearance"] = 5600, ["Chembox_BoilingPt"] = 3600, ["Chembox_CASNo"] = 13000, ["Chembox_CASNo/format"] = 13000, ["Chembox_CalcTemperatures"] = 6400, ["Chembox_ChEBI"] = 13000, ["Chembox_ChEBI/format"] = 13000, ["Chembox_ChEMBL"] = 13000, ["Chembox_ChEMBL/format"] = 13000, ["Chembox_ChemSpiderID"] = 13000, ["Chembox_ChemSpiderID/format"] = 13000, ["Chembox_CompTox"] = 13000, ["Chembox_CompTox/format"] = 13000, ["Chembox_Datapage_check"] = 13000, ["Chembox_Density"] = 4600, ["Chembox_DrugBank"] = 13000, ["Chembox_DrugBank/format"] = 13000, ["Chembox_ECHA"] = 7300, ["Chembox_ECNumber"] = 13000, ["Chembox_ECNumber/format"] = 13000, ["Chembox_Elements"] = 13000, ["Chembox_Elements/molecular_formula"] = 17000, ["Chembox_Footer"] = 13000, ["Chembox_Footer/tracking"] = 13000, ["Chembox_GHS_(set)"] = 3300, ["Chembox_Hazards"] = 11000, ["Chembox_IUPHAR_ligand"] = 13000, ["Chembox_IUPHAR_ligand/format"] = 13000, ["Chembox_Identifiers"] = 13000, ["Chembox_InChI"] = 12000, ["Chembox_InChI/format"] = 12000, ["Chembox_Indexlist"] = 13000, ["Chembox_Jmol"] = 13000, ["Chembox_Jmol/format"] = 13000, ["Chembox_KEGG"] = 13000, ["Chembox_KEGG/format"] = 13000, ["Chembox_MeltingPt"] = 5500, ["Chembox_Properties"] = 13000, ["Chembox_PubChem"] = 13000, ["Chembox_PubChem/format"] = 13000, ["Chembox_RTECS"] = 13000, ["Chembox_RTECS/format"] = 13000, ["Chembox_Related"] = 3000, ["Chembox_SMILES"] = 12000, ["Chembox_SMILES/format"] = 12000, ["Chembox_SolubilityInWater"] = 3700, ["Chembox_UNII"] = 13000, ["Chembox_UNII/format"] = 13000, ["Chembox_headerbar"] = 13000, ["Chembox_image"] = 12000, ["Chembox_image_cell"] = 12000, ["Chembox_image_sbs"] = 12000, ["Chembox_parametercheck"] = 13000, ["Chembox_setDatarow"] = 4300, ["Chembox_setHeader"] = 4300, ["Chembox_templatePar/formatPreviewMessage"] = 13000, ["Chembox_verification"] = 7100, ["Chemicals"] = 7300, ["Chemistry"] = 2900, ["Chemspidercite"] = 11000, ["Chessgames_player"] = 3400, ["Chinese"] = 7700, ["Chr"] = 8900, ["ChristianityWikiProject"] = 6000, ["Circa"] = 52000, ["Circular_reference"] = 4700, ["Citation"] = 352000, ["Citation/make_link"] = 5400, ["Citation/styles.css"] = 44000, ["Citation_needed"] = 505000, ["Citation_needed_span"] = 3200, ["Citation_style"] = 4300, ["Cite_AV_media"] = 39000, ["Cite_AV_media_notes"] = 24000, ["Cite_Appletons'"] = 2400, ["Cite_Australian_Dictionary_of_Biography"] = 2900, ["Cite_Catholic_Encyclopedia"] = 8100, ["Cite_Colledge2006"] = 3100, ["Cite_DCB"] = 2800, ["Cite_DNB"] = 17000, ["Cite_EB1911"] = 24000, ["Cite_GNIS"] = 2500, ["Cite_Gaia_DR2"] = 2300, ["Cite_Jewish_Encyclopedia"] = 2800, ["Cite_NIE"] = 3600, ["Cite_NSW_Parliament"] = 3300, ["Cite_NSW_SHR"] = 2600, ["Cite_ODNB"] = 15000, ["Cite_Q"] = 48000, ["Cite_QHR"] = 3000, ["Cite_QPN"] = 3900, ["Cite_Rowlett"] = 2500, ["Cite_Russian_law"] = 7800, ["Cite_Sports-Reference"] = 54000, ["Cite_WoRMS"] = 4900, ["Cite_act"] = 2200, ["Cite_arXiv"] = 4400, ["Cite_bcgnis"] = 2900, ["Cite_book"] = 1480000, ["Cite_certification"] = 29000, ["Cite_cgndb"] = 2900, ["Cite_conference"] = 14000, ["Cite_court"] = 5000, ["Cite_dictionary"] = 5100, ["Cite_document"] = 8200, ["Cite_encyclopedia"] = 190000, ["Cite_episode"] = 16000, ["Cite_gnis"] = 35000, ["Cite_interview"] = 6800, ["Cite_iucn"] = 54000, ["Cite_journal"] = 884000, ["Cite_magazine"] = 196000, ["Cite_map"] = 32000, ["Cite_news"] = 1380000, ["Cite_newspaper_The_Times"] = 6100, ["Cite_patent"] = 4900, ["Cite_patent/authors"] = 3900, ["Cite_patent/core"] = 5200, ["Cite_peakbagger"] = 4100, ["Cite_podcast"] = 3100, ["Cite_press_release"] = 57000, ["Cite_report"] = 30000, ["Cite_rowlett"] = 2500, ["Cite_simbad"] = 4200, ["Cite_sports-reference"] = 58000, ["Cite_thesis"] = 24000, ["Cite_tweet"] = 29000, ["Cite_video"] = 12000, ["Cite_video_game"] = 3000, ["Cite_web"] = 4320000, ["Cite_wikisource"] = 5100, ["Cite_wikisource/make_link"] = 55000, ["Civil_navigation"] = 2700, ["Cl"] = 112000, ["Clade"] = 6600, ["Clade/styles.css"] = 6600, ["Clarify"] = 38000, ["Class"] = 9620000, ["Class/colour"] = 612000, ["Class/icon"] = 117000, ["Class_mask"] = 9860000, ["Class_mask/b"] = 332000, ["Classical"] = 7000, ["Classicon"] = 4600, ["Clc"] = 5000, ["Cleanup"] = 11000, ["Cleanup_bare_URLs"] = 3300, ["Cleanup_reorganize"] = 2600, ["Cleanup_rewrite"] = 5500, ["Clear"] = 3480000, ["Clear-left"] = 19000, ["Clear_left"] = 31000, ["Clear_right"] = 2800, ["Clerk-Note"] = 9300, ["Clerknote"] = 7000, ["Clickable_button"] = 13000, ["Clickable_button_2"] = 876000, ["Clr"] = 3700, ["Cmbox"] = 399000, ["Cn"] = 75000, ["Cnote2"] = 2100, ["Cnote2_Begin"] = 2100, ["Cnote2_End"] = 2100, ["Coat_of_arms"] = 7500, ["Cob"] = 11000, ["Code"] = 48000, ["Col-1-of-2"] = 2500, ["Col-2"] = 166000, ["Col-2-of-2"] = 2300, ["Col-3"] = 10000, ["Col-4"] = 3500, ["Col-begin"] = 210000, ["Col-break"] = 208000, ["Col-end"] = 208000, ["Col-float"] = 2400, ["Col-float-break"] = 2300, ["Col-float-end"] = 2300, ["Col-float/styles.css"] = 2400, ["Col-start"] = 22000, ["Colbegin"] = 40000, ["Colend"] = 52000, ["Collapse"] = 9100, ["Collapse_bottom"] = 48000, ["Collapse_top"] = 49000, ["Collapsebottom"] = 3800, ["Collapsetop"] = 3800, ["Collapsible_list"] = 50000, ["Collapsible_option"] = 130000, ["College"] = 8000, ["CollegePrimaryHeader"] = 5000, ["CollegePrimaryStyle"] = 90000, ["CollegeSecondaryStyle"] = 2600, ["College_Athlete_Recruit_End"] = 2600, ["College_Athlete_Recruit_Entry"] = 2700, ["College_Athlete_Recruit_Start"] = 2700, ["College_athlete_recruit_end"] = 3700, ["College_athlete_recruit_entry"] = 3800, ["College_athlete_recruit_start"] = 3800, ["College_color_list"] = 3700, ["Colon"] = 17000, ["Color"] = 472000, ["Color_box"] = 71000, ["Colorbox"] = 3400, ["Colorbull"] = 5300, ["Colored_link"] = 34000, ["Colors"] = 2100, ["Colour"] = 9200, ["Coloured_link"] = 5000, ["Column"] = 2100, ["Column/styles.css"] = 2200, ["Columns-list"] = 87000, ["Comedy"] = 2600, ["Comic_Book_DB"] = 3700, ["Comicbookdb"] = 3600, ["Comics-replaceability"] = 3000, ["Comics_infobox_sec"] = 12000, ["Comics_infobox_sec/creator_nat"] = 3000, ["Comics_infobox_sec/formcat"] = 3100, ["Comics_infobox_sec/genre"] = 3900, ["Comics_infobox_sec/genrecat"] = 3500, ["Comicsproj"] = 28000, ["Comicsyrimage"] = 2000, ["Comma_separated_entries"] = 398000, ["Comma_separated_values"] = 39000, ["Comment"] = 4700, ["Committed_identity"] = 3000, ["Committed_identity/styles.css"] = 3000, ["Commons"] = 64000, ["Commons-inline"] = 18000, ["Commons_cat"] = 48000, ["Commons_category"] = 822000, ["Commons_category-inline"] = 134000, ["Commons_category_inline"] = 5600, ["Commonscat"] = 64000, ["Commonscat-inline"] = 18000, ["Commonscat_inline"] = 2200, ["Commonscatinline"] = 7000, ["Compact_TOC"] = 6800, ["Compact_ToC"] = 5000, ["Compare"] = 4700, ["Compare_image_with_Wikidata"] = 9000, ["Composition_bar"] = 9500, ["Confirmed"] = 15000, ["Confused"] = 2500, ["Confusing"] = 2400, ["CongBio"] = 9700, ["CongLinks"] = 4400, ["Connected_contributor"] = 16000, ["Connected_contributor_(paid)"] = 6400, ["Constellation_navbox"] = 6000, ["Container"] = 9600, ["Container_cat"] = 7300, ["Container_category"] = 39000, ["Containercat"] = 2700, ["Contains_special_characters"] = 3700, ["Contains_special_characters/core"] = 3700, ["Contains_special_characters/styles.css"] = 3700, ["Content_category"] = 7500, ["Context"] = 2800, ["Continent2continental"] = 16000, ["Continent_adjective_to_noun"] = 2200, ["Controversial"] = 3100, ["Convert"] = 1120000, ["Convinfobox"] = 195000, ["Convinfobox/2"] = 14000, ["Convinfobox/3"] = 116000, ["Convinfobox/pri2"] = 58000, ["Convinfobox/prisec2"] = 2800, ["Convinfobox/prisec3"] = 24000, ["Convinfobox/sec2"] = 8200, ["Coord"] = 1300000, ["Coord_missing"] = 104000, ["Coord_missing/CheckCat"] = 103000, ["Coords"] = 7800, ["Copied"] = 17000, ["Copy_to_Wikimedia_Commons"] = 125000, ["Copyvios"] = 2800, ["Cospar"] = 3100, ["Cot"] = 11000, ["Count"] = 8100, ["Country2continent"] = 29000, ["Country2continental"] = 2400, ["Country2nationality"] = 73000, ["CountryPrefixThe"] = 102000, ["Country_abbreviation"] = 85000, ["Country_alias"] = 15000, ["Country_at_games_navbox"] = 2500, ["Country_at_games_navbox/below"] = 2500, ["Country_data"] = 5700, ["Country_data_AFG"] = 2000, ["Country_data_ALB"] = 6000, ["Country_data_ALG"] = 8600, ["Country_data_AND"] = 2700, ["Country_data_ANG"] = 3700, ["Country_data_ARG"] = 44000, ["Country_data_ARM"] = 6500, ["Country_data_AUS"] = 71000, ["Country_data_AUT"] = 43000, ["Country_data_AZE"] = 8000, ["Country_data_Afghanistan"] = 11000, ["Country_data_Alabama"] = 2000, ["Country_data_Alaska"] = 2300, ["Country_data_Albania"] = 17000, ["Country_data_Alberta"] = 3500, ["Country_data_Algeria"] = 22000, ["Country_data_American_Samoa"] = 3000, ["Country_data_Andorra"] = 7600, ["Country_data_Angola"] = 10000, ["Country_data_Anguilla"] = 2700, ["Country_data_Antigua_and_Barbuda"] = 5900, ["Country_data_Apulia"] = 7900, ["Country_data_Argentina"] = 72000, ["Country_data_Arizona"] = 2400, ["Country_data_Arkansas"] = 2500, ["Country_data_Armenia"] = 19000, ["Country_data_Aruba"] = 3600, ["Country_data_Australia"] = 114000, ["Country_data_Austria"] = 68000, ["Country_data_Azerbaijan"] = 24000, ["Country_data_BAH"] = 3800, ["Country_data_BAN"] = 3600, ["Country_data_BAR"] = 2400, ["Country_data_BEL"] = 48000, ["Country_data_BER"] = 2200, ["Country_data_BHR"] = 4100, ["Country_data_BIH"] = 12000, ["Country_data_BLR"] = 23000, ["Country_data_BOL"] = 5300, ["Country_data_BOT"] = 2100, ["Country_data_BRA"] = 54000, ["Country_data_BUL"] = 23000, ["Country_data_Bahamas"] = 9400, ["Country_data_Bahrain"] = 10000, ["Country_data_Bangladesh"] = 16000, ["Country_data_Barbados"] = 7900, ["Country_data_Belarus"] = 39000, ["Country_data_Belgium"] = 78000, ["Country_data_Belize"] = 5100, ["Country_data_Benin"] = 7000, ["Country_data_Bermuda"] = 5700, ["Country_data_Bhutan"] = 4600, ["Country_data_Bolivia"] = 14000, ["Country_data_Bosnia_and_Herzegovina"] = 26000, ["Country_data_Botswana"] = 8800, ["Country_data_Brazil"] = 92000, ["Country_data_British_Columbia"] = 3200, ["Country_data_British_Raj"] = 2100, ["Country_data_British_Virgin_Islands"] = 3400, ["Country_data_Brunei"] = 5900, ["Country_data_Bulgaria"] = 46000, ["Country_data_Burkina_Faso"] = 9800, ["Country_data_Burma"] = 2700, ["Country_data_Burundi"] = 5600, ["Country_data_CAN"] = 55000, ["Country_data_CGO"] = 2200, ["Country_data_CHE"] = 4500, ["Country_data_CHI"] = 17000, ["Country_data_CHN"] = 39000, ["Country_data_CIV"] = 7400, ["Country_data_CMR"] = 8100, ["Country_data_COD"] = 3000, ["Country_data_COL"] = 23000, ["Country_data_CRC"] = 6200, ["Country_data_CRO"] = 31000, ["Country_data_CUB"] = 9100, ["Country_data_CYP"] = 8300, ["Country_data_CZE"] = 43000, ["Country_data_California"] = 6600, ["Country_data_Cambodia"] = 8400, ["Country_data_Cameroon"] = 16000, ["Country_data_Canada"] = 110000, ["Country_data_Cape_Verde"] = 6000, ["Country_data_Castile_and_León"] = 2000, ["Country_data_Catalonia"] = 3000, ["Country_data_Cayman_Islands"] = 4200, ["Country_data_Central_African_Republic"] = 4800, ["Country_data_Chad"] = 5300, ["Country_data_Chile"] = 36000, ["Country_data_China"] = 74000, ["Country_data_Chinese_Taipei"] = 17000, ["Country_data_Colombia"] = 41000, ["Country_data_Colorado"] = 5800, ["Country_data_Comoros"] = 4300, ["Country_data_Confederate_States_of_America"] = 3000, ["Country_data_Connecticut"] = 3400, ["Country_data_Cook_Islands"] = 3700, ["Country_data_Costa_Rica"] = 16000, ["Country_data_Croatia"] = 50000, ["Country_data_Cuba"] = 20000, ["Country_data_Curaçao"] = 3300, ["Country_data_Cyprus"] = 19000, ["Country_data_Czech_Republic"] = 71000, ["Country_data_Czechoslovakia"] = 16000, ["Country_data_DEN"] = 32000, ["Country_data_DEU"] = 8100, ["Country_data_DNK"] = 3300, ["Country_data_DOM"] = 6800, ["Country_data_Democratic_Republic_of_the_Congo"] = 11000, ["Country_data_Denmark"] = 63000, ["Country_data_Djibouti"] = 4500, ["Country_data_Dominica"] = 4300, ["Country_data_Dominican_Republic"] = 15000, ["Country_data_ECU"] = 11000, ["Country_data_EGY"] = 12000, ["Country_data_ENG"] = 44000, ["Country_data_ESA"] = 2100, ["Country_data_ESP"] = 68000, ["Country_data_EST"] = 13000, ["Country_data_ETH"] = 3200, ["Country_data_EU"] = 3800, ["Country_data_East_Germany"] = 12000, ["Country_data_East_Timor"] = 4900, ["Country_data_Ecuador"] = 22000, ["Country_data_Egypt"] = 31000, ["Country_data_El_Salvador"] = 12000, ["Country_data_Empire_of_Japan"] = 3800, ["Country_data_England"] = 87000, ["Country_data_Equatorial_Guinea"] = 5100, ["Country_data_Eritrea"] = 5200, ["Country_data_Estonia"] = 32000, ["Country_data_Eswatini"] = 4800, ["Country_data_Ethiopia"] = 12000, ["Country_data_Europe"] = 2400, ["Country_data_European_Union"] = 7400, ["Country_data_FIJ"] = 3600, ["Country_data_FIN"] = 32000, ["Country_data_FRA"] = 91000, ["Country_data_FRG"] = 13000, ["Country_data_FR_Yugoslavia"] = 3700, ["Country_data_Falkland_Islands"] = 2100, ["Country_data_Faroe_Islands"] = 5200, ["Country_data_Federated_States_of_Micronesia"] = 3100, ["Country_data_Fiji"] = 11000, ["Country_data_Finland"] = 58000, ["Country_data_Florida"] = 6900, ["Country_data_France"] = 186000, ["Country_data_French_Guiana"] = 2100, ["Country_data_French_Polynesia"] = 3600, ["Country_data_GAB"] = 2200, ["Country_data_GBR"] = 51000, ["Country_data_GDR"] = 6900, ["Country_data_GEO"] = 12000, ["Country_data_GER"] = 76000, ["Country_data_GHA"] = 9100, ["Country_data_GRE"] = 24000, ["Country_data_GUA"] = 4800, ["Country_data_GUI"] = 2900, ["Country_data_GUY"] = 2300, ["Country_data_Gabon"] = 7300, ["Country_data_Gambia"] = 6400, ["Country_data_Georgia"] = 7800, ["Country_data_Georgia_(U.S._state)"] = 2800, ["Country_data_Georgia_(country)"] = 25000, ["Country_data_German_Empire"] = 5200, ["Country_data_Germany"] = 136000, ["Country_data_Ghana"] = 21000, ["Country_data_Gibraltar"] = 4900, ["Country_data_Great_Britain"] = 60000, ["Country_data_Greece"] = 52000, ["Country_data_Greenland"] = 2700, ["Country_data_Grenada"] = 5100, ["Country_data_Guadeloupe"] = 2700, ["Country_data_Guam"] = 4700, ["Country_data_Guatemala"] = 12000, ["Country_data_Guernsey"] = 2400, ["Country_data_Guinea"] = 8100, ["Country_data_Guinea-Bissau"] = 4900, ["Country_data_Guyana"] = 7400, ["Country_data_HAI"] = 2900, ["Country_data_HKG"] = 12000, ["Country_data_HON"] = 4200, ["Country_data_HUN"] = 34000, ["Country_data_Haiti"] = 8500, ["Country_data_Honduras"] = 11000, ["Country_data_Hong_Kong"] = 23000, ["Country_data_Hungary"] = 60000, ["Country_data_IDN"] = 4500, ["Country_data_INA"] = 9700, ["Country_data_IND"] = 28000, ["Country_data_IRE"] = 9900, ["Country_data_IRI"] = 4900, ["Country_data_IRL"] = 19000, ["Country_data_IRN"] = 5800, ["Country_data_IRQ"] = 3800, ["Country_data_ISL"] = 7900, ["Country_data_ISR"] = 20000, ["Country_data_ITA"] = 80000, ["Country_data_Iceland"] = 20000, ["Country_data_Idaho"] = 2400, ["Country_data_Illinois"] = 5600, ["Country_data_India"] = 97000, ["Country_data_Indiana"] = 3100, ["Country_data_Indonesia"] = 34000, ["Country_data_Iowa"] = 3200, ["Country_data_Iran"] = 84000, ["Country_data_Iraq"] = 13000, ["Country_data_Ireland"] = 33000, ["Country_data_Isle_of_Man"] = 3100, ["Country_data_Israel"] = 40000, ["Country_data_Italy"] = 130000, ["Country_data_Ivory_Coast"] = 16000, ["Country_data_JAM"] = 8800, ["Country_data_JOR"] = 3600, ["Country_data_JP"] = 8100, ["Country_data_JPN"] = 56000, ["Country_data_Jamaica"] = 18000, ["Country_data_Japan"] = 106000, ["Country_data_Jersey"] = 2700, ["Country_data_Jordan"] = 11000, ["Country_data_KAZ"] = 18000, ["Country_data_KEN"] = 6800, ["Country_data_KGZ"] = 3400, ["Country_data_KOR"] = 29000, ["Country_data_KSA"] = 5400, ["Country_data_KUW"] = 3800, ["Country_data_Kazakhstan"] = 31000, ["Country_data_Kentucky"] = 2300, ["Country_data_Kenya"] = 18000, ["Country_data_Kingdom_of_France"] = 2000, ["Country_data_Kingdom_of_Great_Britain"] = 4500, ["Country_data_Kingdom_of_Italy"] = 3700, ["Country_data_Kiribati"] = 3000, ["Country_data_Kosovo"] = 8000, ["Country_data_Kuwait"] = 10000, ["Country_data_Kyrgyzstan"] = 9000, ["Country_data_LAT"] = 13000, ["Country_data_LBN"] = 2000, ["Country_data_LIB"] = 2500, ["Country_data_LIE"] = 2900, ["Country_data_LIT"] = 2900, ["Country_data_LTU"] = 11000, ["Country_data_LUX"] = 9800, ["Country_data_LVA"] = 2400, ["Country_data_Laos"] = 7300, ["Country_data_Latvia"] = 29000, ["Country_data_Lebanon"] = 14000, ["Country_data_Lesotho"] = 5000, ["Country_data_Liberia"] = 7000, ["Country_data_Libya"] = 8500, ["Country_data_Liechtenstein"] = 7500, ["Country_data_Lithuania"] = 28000, ["Country_data_Louisiana"] = 2200, ["Country_data_Luxembourg"] = 21000, ["Country_data_MAC"] = 2300, ["Country_data_MAR"] = 11000, ["Country_data_MAS"] = 10000, ["Country_data_MDA"] = 6900, ["Country_data_MEX"] = 28000, ["Country_data_MGL"] = 2600, ["Country_data_MKD"] = 6900, ["Country_data_MLI"] = 4000, ["Country_data_MLT"] = 5200, ["Country_data_MNE"] = 7300, ["Country_data_MON"] = 3300, ["Country_data_MOZ"] = 2000, ["Country_data_MYA"] = 2800, ["Country_data_MYS"] = 3500, ["Country_data_Macau"] = 6100, ["Country_data_Macedonia"] = 4800, ["Country_data_Madagascar"] = 8700, ["Country_data_Malawi"] = 5500, ["Country_data_Malaysia"] = 33000, ["Country_data_Maldives"] = 6000, ["Country_data_Mali"] = 11000, ["Country_data_Malta"] = 15000, ["Country_data_Manitoba"] = 2500, ["Country_data_Marshall_Islands"] = 3700, ["Country_data_Martinique"] = 2700, ["Country_data_Maryland"] = 3600, ["Country_data_Massachusetts"] = 3200, ["Country_data_Mauritania"] = 5600, ["Country_data_Mauritius"] = 7800, ["Country_data_Mexico"] = 56000, ["Country_data_Michigan"] = 4400, ["Country_data_Minnesota"] = 4000, ["Country_data_Missouri"] = 2400, ["Country_data_Moldova"] = 17000, ["Country_data_Monaco"] = 9600, ["Country_data_Mongolia"] = 9300, ["Country_data_Montana"] = 2600, ["Country_data_Montenegro"] = 16000, ["Country_data_Montserrat"] = 2600, ["Country_data_Morocco"] = 24000, ["Country_data_Mozambique"] = 7100, ["Country_data_Myanmar"] = 13000, ["Country_data_NAM"] = 3200, ["Country_data_NED"] = 56000, ["Country_data_NEP"] = 2600, ["Country_data_NGA"] = 7400, ["Country_data_NGR"] = 7500, ["Country_data_NIR"] = 9300, ["Country_data_NLD"] = 5800, ["Country_data_NOR"] = 27000, ["Country_data_NZ"] = 3000, ["Country_data_NZL"] = 30000, ["Country_data_Namibia"] = 9500, ["Country_data_Nauru"] = 2500, ["Country_data_Nazi_Germany"] = 9400, ["Country_data_Nepal"] = 15000, ["Country_data_Netherlands"] = 100000, ["Country_data_Netherlands_Antilles"] = 2300, ["Country_data_Nevada"] = 2200, ["Country_data_New_Brunswick"] = 2600, ["Country_data_New_Caledonia"] = 3400, ["Country_data_New_Hampshire"] = 2100, ["Country_data_New_Jersey"] = 4400, ["Country_data_New_Mexico"] = 2200, ["Country_data_New_South_Wales"] = 5500, ["Country_data_New_York"] = 4200, ["Country_data_New_York_(state)"] = 7000, ["Country_data_New_Zealand"] = 55000, ["Country_data_Newfoundland_and_Labrador"] = 2300, ["Country_data_Nicaragua"] = 8200, ["Country_data_Niger"] = 5600, ["Country_data_Nigeria"] = 31000, ["Country_data_North_Carolina"] = 3800, ["Country_data_North_Korea"] = 12000, ["Country_data_North_Macedonia"] = 15000, ["Country_data_Northern_Cyprus"] = 2100, ["Country_data_Northern_Ireland"] = 14000, ["Country_data_Northern_Mariana_Islands"] = 2800, ["Country_data_Norway"] = 62000, ["Country_data_Nova_Scotia"] = 2300, ["Country_data_OMA"] = 2500, ["Country_data_Ohio"] = 5600, ["Country_data_Oman"] = 8400, ["Country_data_Ontario"] = 3800, ["Country_data_Ottoman_Empire"] = 2500, ["Country_data_PAK"] = 7700, ["Country_data_PAN"] = 5400, ["Country_data_PAR"] = 9400, ["Country_data_PER"] = 11000, ["Country_data_PHI"] = 11000, ["Country_data_PHL"] = 2600, ["Country_data_PNG"] = 2500, ["Country_data_POL"] = 46000, ["Country_data_POR"] = 29000, ["Country_data_PRC"] = 2400, ["Country_data_PRK"] = 4400, ["Country_data_PRT"] = 2700, ["Country_data_PUR"] = 7000, ["Country_data_Pakistan"] = 26000, ["Country_data_Palau"] = 3000, ["Country_data_Palestine"] = 6500, ["Country_data_Panama"] = 14000, ["Country_data_Papua_New_Guinea"] = 7700, ["Country_data_Paraguay"] = 18000, ["Country_data_Pennsylvania"] = 4200, ["Country_data_People's_Republic_of_China"] = 3200, ["Country_data_Peru"] = 29000, ["Country_data_Philippines"] = 33000, ["Country_data_Poland"] = 136000, ["Country_data_Portugal"] = 58000, ["Country_data_Prussia"] = 2500, ["Country_data_Puerto_Rico"] = 16000, ["Country_data_QAT"] = 7200, ["Country_data_Qatar"] = 15000, ["Country_data_Quebec"] = 4200, ["Country_data_ROM"] = 12000, ["Country_data_ROU"] = 24000, ["Country_data_RSA"] = 30000, ["Country_data_RUS"] = 60000, ["Country_data_Republic_of_China"] = 6000, ["Country_data_Republic_of_Ireland"] = 22000, ["Country_data_Republic_of_the_Congo"] = 7300, ["Country_data_Romania"] = 57000, ["Country_data_Russia"] = 103000, ["Country_data_Russian_Empire"] = 4600, ["Country_data_Rwanda"] = 7300, ["Country_data_SAM"] = 2900, ["Country_data_SCG"] = 3100, ["Country_data_SCO"] = 24000, ["Country_data_SEN"] = 7200, ["Country_data_SER"] = 3400, ["Country_data_SGP"] = 2300, ["Country_data_SIN"] = 6700, ["Country_data_SLO"] = 18000, ["Country_data_SLV"] = 2900, ["Country_data_SMR"] = 2900, ["Country_data_SPA"] = 4300, ["Country_data_SRB"] = 24000, ["Country_data_SRI"] = 4400, ["Country_data_SUI"] = 39000, ["Country_data_SVK"] = 27000, ["Country_data_SVN"] = 6300, ["Country_data_SWE"] = 52000, ["Country_data_SWI"] = 4500, ["Country_data_SYR"] = 3300, ["Country_data_Saint_Kitts_and_Nevis"] = 4700, ["Country_data_Saint_Lucia"] = 4800, ["Country_data_Saint_Vincent_and_the_Grenadines"] = 4700, ["Country_data_Samoa"] = 7600, ["Country_data_San_Marino"] = 8200, ["Country_data_Saskatchewan"] = 3100, ["Country_data_Saudi_Arabia"] = 17000, ["Country_data_Scotland"] = 46000, ["Country_data_Senegal"] = 15000, ["Country_data_Serbia"] = 49000, ["Country_data_Serbia_and_Montenegro"] = 5000, ["Country_data_Seychelles"] = 5400, ["Country_data_Sierra_Leone"] = 7000, ["Country_data_Singapore"] = 24000, ["Country_data_Slovakia"] = 46000, ["Country_data_Slovenia"] = 38000, ["Country_data_Solomon_Islands"] = 4600, ["Country_data_Somalia"] = 6000, ["Country_data_South_Africa"] = 59000, ["Country_data_South_Carolina"] = 3700, ["Country_data_South_Korea"] = 56000, ["Country_data_South_Sudan"] = 3800, ["Country_data_South_Vietnam"] = 2100, ["Country_data_Soviet_Union"] = 33000, ["Country_data_Spain"] = 119000, ["Country_data_Sri_Lanka"] = 17000, ["Country_data_Sudan"] = 7800, ["Country_data_Suriname"] = 6300, ["Country_data_Swaziland"] = 2000, ["Country_data_Sweden"] = 90000, ["Country_data_Switzerland"] = 72000, ["Country_data_Syria"] = 14000, ["Country_data_São_Tomé_and_Príncipe"] = 3400, ["Country_data_TAN"] = 2300, ["Country_data_TCH"] = 9500, ["Country_data_THA"] = 19000, ["Country_data_TJK"] = 2400, ["Country_data_TKM"] = 2600, ["Country_data_TPE"] = 14000, ["Country_data_TRI"] = 4600, ["Country_data_TUN"] = 9800, ["Country_data_TUR"] = 25000, ["Country_data_Taiwan"] = 11000, ["Country_data_Tajikistan"] = 8900, ["Country_data_Tanzania"] = 11000, ["Country_data_Tennessee"] = 2400, ["Country_data_Texas"] = 6200, ["Country_data_Thailand"] = 39000, ["Country_data_Togo"] = 6700, ["Country_data_Tonga"] = 6200, ["Country_data_Trinidad_and_Tobago"] = 13000, ["Country_data_Tunisia"] = 19000, ["Country_data_Turkey"] = 68000, ["Country_data_Turkmenistan"] = 7700, ["Country_data_Turks_and_Caicos_Islands"] = 2700, ["Country_data_Tuvalu"] = 2600, ["Country_data_U.S."] = 2100, ["Country_data_U.S._Virgin_Islands"] = 4900, ["Country_data_UAE"] = 8600, ["Country_data_UGA"] = 3700, ["Country_data_UK"] = 18000, ["Country_data_UKGBI"] = 2800, ["Country_data_UKR"] = 34000, ["Country_data_URS"] = 12000, ["Country_data_URU"] = 14000, ["Country_data_US"] = 5100, ["Country_data_USA"] = 127000, ["Country_data_USSR"] = 4400, ["Country_data_UZB"] = 10000, ["Country_data_Uganda"] = 12000, ["Country_data_Ukraine"] = 60000, ["Country_data_United_Arab_Emirates"] = 18000, ["Country_data_United_Kingdom"] = 82000, ["Country_data_United_Kingdom_of_Great_Britain_and_Ireland"] = 4100, ["Country_data_United_Nations"] = 4100, ["Country_data_United_States"] = 270000, ["Country_data_United_States_of_America"] = 5000, ["Country_data_Uruguay"] = 27000, ["Country_data_Uzbekistan"] = 18000, ["Country_data_VEN"] = 16000, ["Country_data_VIE"] = 5800, ["Country_data_Vanuatu"] = 5000, ["Country_data_Vatican_City"] = 2300, ["Country_data_Venezuela"] = 31000, ["Country_data_Vietnam"] = 20000, ["Country_data_Virginia"] = 3400, ["Country_data_WAL"] = 16000, ["Country_data_Wales"] = 32000, ["Country_data_Washington"] = 3300, ["Country_data_Washington,_D.C."] = 2300, ["Country_data_Washington_(state)"] = 3800, ["Country_data_West_Germany"] = 20000, ["Country_data_West_Indies"] = 2500, ["Country_data_Wisconsin"] = 6100, ["Country_data_Wyoming"] = 2300, ["Country_data_YUG"] = 9000, ["Country_data_Yemen"] = 7000, ["Country_data_Yugoslavia"] = 16000, ["Country_data_ZAF"] = 4400, ["Country_data_ZAM"] = 3000, ["Country_data_ZIM"] = 7800, ["Country_data_Zambia"] = 9200, ["Country_data_Zimbabwe"] = 16000, ["Country_flagbio"] = 24000, ["Country_name"] = 23000, ["Country_showdata"] = 5800, ["Country_topics"] = 21000, ["County"] = 7400, ["County_(judet)_of_Romania"] = 3300, ["Course_assignment"] = 4200, ["Course_details"] = 5500, ["Course_instructor"] = 2200, ["Cquote"] = 36000, ["Cr"] = 4000, ["Create_taxonomy/link"] = 99000, ["Cref2"] = 2200, ["Cricinfo"] = 23000, ["Cricketarchive"] = 3100, ["Crime_opentask"] = 41000, ["Croatian_Census_2011"] = 2100, ["Cross"] = 3000, ["Crossreference"] = 2200, ["Crossreference/styles.css"] = 2200, ["Csv"] = 2900, ["Ct"] = 12000, ["Curlie"] = 6900, ["Currency"] = 2900, ["Current_events"] = 8700, ["Current_events/styles.css"] = 8700, ["Currentdate"] = 22000, ["Cvt"] = 87000, ["Cycling_Archives"] = 4300, ["Cycling_archives"] = 2700, ["Cycling_team_link"] = 12000, ["Module:CFB_schedule"] = 24000, ["Module:CallAssert"] = 226000, ["Module:CanElecResTopTest"] = 5300, ["Module:CanadaByProvinceCatNav"] = 9700, ["Module:Cat_main"] = 176000, ["Module:Cat_more_if_exists"] = 44000, ["Module:Catalog_lookup_link"] = 488000, ["Module:Category_described_in_year"] = 5700, ["Module:Category_described_in_year/conf"] = 5700, ["Module:Category_handler"] = 4320000, ["Module:Category_handler/blacklist"] = 4320000, ["Module:Category_handler/config"] = 4320000, ["Module:Category_handler/data"] = 4320000, ["Module:Category_handler/shared"] = 4320000, ["Module:Category_pair"] = 5900, ["Module:Category_see_also"] = 33000, ["Module:Celestial_object_quadrangle"] = 2600, ["Module:Check_DYK_hook"] = 111000, ["Module:Check_for_clobbered_parameters"] = 1160000, ["Module:Check_for_unknown_parameters"] = 13000000, ["Module:Check_isxn"] = 476000, ["Module:Check_winner_by_scores"] = 13000, ["Module:Checkuser"] = 71000, ["Module:Chem2"] = 2100, ["Module:Chem2/styles.css"] = 2100, ["Module:Citation/CS1"] = 5300000, ["Module:Citation/CS1/COinS"] = 5300000, ["Module:Citation/CS1/Configuration"] = 5300000, ["Module:Citation/CS1/Date_validation"] = 5300000, ["Module:Citation/CS1/Identifiers"] = 5300000, ["Module:Citation/CS1/Suggestions"] = 26000, ["Module:Citation/CS1/Utilities"] = 5300000, ["Module:Citation/CS1/Whitelist"] = 5300000, ["Module:Citation/CS1/styles.css"] = 5440000, ["Module:Cite_Q"] = 48000, ["Module:Cite_iucn"] = 54000, ["Module:Cite_tweet"] = 29000, ["Module:Cite_web"] = 33000, ["Module:Clade"] = 6600, ["Module:Class"] = 9590000, ["Module:Class/configuration"] = 9590000, ["Module:Class/definition.json"] = 9590000, ["Module:Class/styles.css"] = 9530000, ["Module:Clickable_button_2"] = 876000, ["Module:Collapsible_list"] = 51000, ["Module:College_color"] = 121000, ["Module:College_color/data"] = 120000, ["Module:Color_contrast"] = 484000, ["Module:Color_contrast/colors"] = 486000, ["Module:Commons_link"] = 238000, ["Module:Complex_date"] = 67000, ["Module:Convert"] = 1180000, ["Module:Convert/data"] = 1180000, ["Module:Convert/helper"] = 7100, ["Module:Convert/text"] = 1180000, ["Module:Convert/wikidata"] = 2600, ["Module:Convert/wikidata/data"] = 2600, ["Module:ConvertNumeric"] = 27000, ["Module:Convert_character_width"] = 2800, ["Module:Convert_character_width/data"] = 2800, ["Module:Coordinates"] = 1300000, ["Module:Coordinates/styles.css"] = 1300000, ["Module:Copied"] = 17000, ["Module:CountryAdjectiveDemonym"] = 42000, ["Module:CountryAdjectiveDemonym/Adjectives"] = 42000, ["Module:CountryAdjectiveDemonym/Demonyms"] = 42000, ["Module:CountryAdjectiveDemonym/The"] = 42000, ["Module:CountryData"] = 40000, ["Module:CountryData/cacheA"] = 2100, ["Module:CountryData/cacheE"] = 2400, ["Module:CountryData/summary"] = 40000, ["Module:Country_adjective"] = 4000, ["Module:Country_alias"] = 51000, ["Module:Country_alias/data"] = 51000, ["Module:Currency"] = 3000, ["Module:Currency/Presentation"] = 3000, } 2efe2bd63761fa4eec18cf757a7ac1e7b18345a5 Module:Transclusion count/data/I 828 115 288 2022-07-31T05:11:21Z en>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["IAAF_name"] = 2200, ["IAST"] = 5700, ["IBDB_name"] = 9000, ["ICD10"] = 4600, ["ICD9"] = 4400, ["ICS"] = 2800, ["IDN"] = 3200, ["IMDb_episode"] = 9100, ["IMDb_episodes"] = 2100, ["IMDb_name"] = 148000, ["IMDb_title"] = 182000, ["IMO_Number"] = 3900, ["IMSLP"] = 7800, ["IND"] = 7500, ["INR"] = 5900, ["INRConvert"] = 5200, ["INRConvert/CurrentRate"] = 5200, ["INRConvert/USD"] = 5200, ["INRConvert/out"] = 5200, ["IOC_profile"] = 6400, ["IP"] = 2500, ["IPA"] = 132000, ["IPA-all"] = 3300, ["IPA-de"] = 7400, ["IPA-es"] = 7600, ["IPA-fr"] = 39000, ["IPA-it"] = 5600, ["IPA-nl"] = 3400, ["IPA-pl"] = 3800, ["IPA-pt"] = 3500, ["IPA-ru"] = 2500, ["IPA-sh"] = 2700, ["IPA-sl"] = 6800, ["IPA-th"] = 2900, ["IPA_audio_link"] = 17000, ["IPA_link"] = 3000, ["IPAc-cmn"] = 2500, ["IPAc-en"] = 45000, ["IPAc-pl"] = 52000, ["IPC_athlete"] = 2400, ["IPSummary"] = 77000, ["IP_summary"] = 78000, ["IPsock"] = 13000, ["IPtalk"] = 26000, ["IPuser"] = 7000, ["IPvandal"] = 12000, ["IRC"] = 9500, ["IRI"] = 2100, ["IRL"] = 5300, ["IRN"] = 3500, ["ISBN"] = 457000, ["ISBNT"] = 37000, ["ISL"] = 2000, ["ISO_15924/script-example-character"] = 2700, ["ISO_15924/wp-article"] = 2700, ["ISO_15924/wp-article/format"] = 2700, ["ISO_15924/wp-article/label"] = 2600, ["ISO_3166_code"] = 224000, ["ISO_3166_name"] = 16000, ["ISO_639_name"] = 6400, ["ISP"] = 6900, ["ISR"] = 4500, ["ISSN"] = 11000, ["ISSN_link"] = 29000, ["ISTAT"] = 8100, ["ISU_figure_skater"] = 2400, ["ITA"] = 17000, ["ITF"] = 5700, ["ITF_profile"] = 8500, ["ITIS"] = 4200, ["ITN_talk"] = 9000, ["ITN_talk/date"] = 9000, ["IUCN_banner"] = 15000, ["I_sup"] = 4400, ["Iaaf_name"] = 7400, ["Ice_hockey"] = 20000, ["Ice_hockey_stats"] = 15000, ["Icehockeystats"] = 11000, ["Icon"] = 546000, ["If"] = 256000, ["If_all"] = 5600, ["If_between"] = 3700, ["If_both"] = 9640000, ["If_empty"] = 2860000, ["If_first_display_both"] = 60000, ["If_in_page"] = 7300, ["If_last_display_both"] = 27000, ["If_preview"] = 55000, ["If_then_show"] = 233000, ["Ifempty"] = 4100, ["Iferror_then_show"] = 2900, ["Ifexist_not_redirect"] = 1080000, ["Ifnotempty"] = 13000, ["Ifnumber"] = 23000, ["Ifsubst"] = 65000, ["Ih"] = 7500, ["Ill"] = 94000, ["Illm"] = 6900, ["Image_frame"] = 3500, ["Image_label"] = 4500, ["Image_label_begin"] = 3800, ["Image_label_end"] = 3400, ["Image_label_small"] = 2600, ["Image_needed"] = 4500, ["Image_other"] = 291000, ["Image_requested"] = 169000, ["Image_requested/Category_helper"] = 162000, ["Imbox"] = 904000, ["Imdb_name"] = 5300, ["Imdb_title"] = 5800, ["Import_style"] = 12000, ["Import_style/inputbox.css"] = 12000, ["Importance"] = 5450000, ["Importance/colour"] = 5460000, ["Importance_mask"] = 8630000, ["Improve_categories"] = 6300, ["In_class"] = 5100, ["In_lang"] = 341000, ["In_progress"] = 2800, ["In_string"] = 63000, ["In_title"] = 17000, ["Inactive_WikiProject_banner"] = 177000, ["Inactive_userpage_blanked"] = 4700, ["Include-USGov"] = 30000, ["Incomplete_list"] = 22000, ["Increase"] = 39000, ["Incumbent_pope"] = 4300, ["Indent"] = 3900, ["IndexFungorum"] = 2200, ["Indian_English"] = 3900, ["Indian_Rupee"] = 9600, ["Indian_railway_code"] = 3100, ["Inflation"] = 17000, ["Inflation-fn"] = 5100, ["Inflation-year"] = 4200, ["Inflation/IN/startyear"] = 5200, ["Inflation/UK"] = 4000, ["Inflation/UK/dataset"] = 4000, ["Inflation/UK/startyear"] = 4000, ["Inflation/US"] = 11000, ["Inflation/US/dataset"] = 11000, ["Inflation/US/startyear"] = 11000, ["Inflation/fn"] = 5700, ["Inflation/year"] = 21000, ["Info"] = 7100, ["Infobox"] = 3490000, ["Infobox/Columns"] = 2100, ["Infobox/mobileviewfix.css"] = 17000, ["Infobox3cols"] = 290000, ["Infobox_AFL_biography"] = 14000, ["Infobox_Aircraft_Begin"] = 5700, ["Infobox_Aircraft_Type"] = 5000, ["Infobox_Athletics_Championships"] = 2500, ["Infobox_Australian_place"] = 15000, ["Infobox_CFL_biography"] = 2300, ["Infobox_COA_wide"] = 2900, ["Infobox_Canada_electoral_district"] = 2400, ["Infobox_Canadian_Football_League_biography"] = 5900, ["Infobox_Canadian_Football_League_biography/position"] = 5900, ["Infobox_Chinese"] = 18000, ["Infobox_Chinese/Footer"] = 8800, ["Infobox_Chinese/Header"] = 8800, ["Infobox_Chinese/Korean"] = 14000, ["Infobox_Christian_leader"] = 17000, ["Infobox_Election"] = 2500, ["Infobox_French_commune"] = 37000, ["Infobox_GAA_player"] = 3200, ["Infobox_Gaelic_Athletic_Association_player"] = 4800, ["Infobox_German_location"] = 13000, ["Infobox_German_place"] = 14000, ["Infobox_Greece_place"] = 2800, ["Infobox_Greek_Dimos"] = 2800, ["Infobox_Hindu_temple"] = 2300, ["Infobox_Indian_state_legislative_assembly_constituency"] = 3600, ["Infobox_Italian_comune"] = 8100, ["Infobox_Korean_name"] = 15000, ["Infobox_Korean_name/categories"] = 14000, ["Infobox_MLB_yearly"] = 3000, ["Infobox_NCAA_team_season"] = 19000, ["Infobox_NFL_biography"] = 27000, ["Infobox_NFL_player"] = 8400, ["Infobox_NFL_season"] = 2600, ["Infobox_NFL_team_season"] = 3800, ["Infobox_NRHP"] = 72000, ["Infobox_NRHP/conv"] = 18000, ["Infobox_NRHP/locmapin2region"] = 65000, ["Infobox_Newspaper"] = 2000, ["Infobox_Officeholder"] = 6100, ["Infobox_Olympic_event"] = 7200, ["Infobox_Olympic_event/games_text"] = 7200, ["Infobox_Paralympic_event"] = 2500, ["Infobox_Paralympic_event/games_text"] = 2500, ["Infobox_Person"] = 2200, ["Infobox_Politician"] = 2700, ["Infobox_Romanian_subdivision"] = 3100, ["Infobox_Russian_district"] = 2000, ["Infobox_Russian_inhabited_locality"] = 4300, ["Infobox_SCOTUS_case"] = 3600, ["Infobox_Site_of_Special_Scientific_Interest"] = 2000, ["Infobox_Software"] = 2000, ["Infobox_Swiss_town"] = 2800, ["Infobox_Switzerland_municipality"] = 2900, ["Infobox_U.S._county"] = 3000, ["Infobox_U.S._county/district"] = 3000, ["Infobox_UK_legislation"] = 2200, ["Infobox_UK_place"] = 25000, ["Infobox_UK_place/NoDialCode"] = 7700, ["Infobox_UK_place/NoPostCode"] = 2800, ["Infobox_UK_place/area"] = 2300, ["Infobox_UK_place/dist"] = 2400, ["Infobox_UK_place/local"] = 25000, ["Infobox_UK_place/styles.css"] = 25000, ["Infobox_UN_resolution"] = 2200, ["Infobox_US_Supreme_Court_case"] = 3800, ["Infobox_US_Supreme_Court_case/courts"] = 3700, ["Infobox_Wikipedia_user"] = 8900, ["Infobox_YouTube_personality"] = 2300, ["Infobox_academic"] = 11000, ["Infobox_aircraft_begin"] = 14000, ["Infobox_aircraft_occurrence"] = 2200, ["Infobox_aircraft_type"] = 13000, ["Infobox_airline"] = 4500, ["Infobox_airport"] = 15000, ["Infobox_airport/datatable"] = 15000, ["Infobox_album"] = 158000, ["Infobox_album/color"] = 185000, ["Infobox_album/link"] = 159000, ["Infobox_anatomy"] = 4400, ["Infobox_ancient_site"] = 4900, ["Infobox_animanga/Footer"] = 6500, ["Infobox_animanga/Header"] = 6500, ["Infobox_animanga/Print"] = 5100, ["Infobox_animanga/Video"] = 4500, ["Infobox_architect"] = 3400, ["Infobox_artist"] = 27000, ["Infobox_artist_discography"] = 5700, ["Infobox_artwork"] = 10000, ["Infobox_athlete"] = 3200, ["Infobox_automobile"] = 8000, ["Infobox_award"] = 12000, ["Infobox_badminton_player"] = 3100, ["Infobox_baseball_biography"] = 28000, ["Infobox_baseball_biography/style"] = 28000, ["Infobox_baseball_biography/styles.css"] = 28000, ["Infobox_basketball_biography"] = 20000, ["Infobox_basketball_biography/style"] = 20000, ["Infobox_basketball_club"] = 2900, ["Infobox_beauty_pageant"] = 2200, ["Infobox_bilateral_relations"] = 4200, ["Infobox_body_of_water"] = 17000, ["Infobox_book"] = 50000, ["Infobox_boxer"] = 5500, ["Infobox_bridge"] = 5800, ["Infobox_building"] = 25000, ["Infobox_character"] = 7700, ["Infobox_chess_biography"] = 3400, ["Infobox_chess_player"] = 2900, ["Infobox_church"] = 14000, ["Infobox_church/denomination"] = 14000, ["Infobox_church/font_color"] = 14000, ["Infobox_civil_conflict"] = 2100, ["Infobox_civilian_attack"] = 4700, ["Infobox_college_coach"] = 11000, ["Infobox_college_sports_team_season"] = 36000, ["Infobox_college_sports_team_season/link"] = 36000, ["Infobox_college_sports_team_season/name"] = 36000, ["Infobox_college_sports_team_season/succession"] = 36000, ["Infobox_college_sports_team_season/team"] = 36000, ["Infobox_comic_book_title"] = 2900, ["Infobox_comics_character"] = 3600, ["Infobox_comics_creator"] = 3400, ["Infobox_company"] = 81000, ["Infobox_concert"] = 3200, ["Infobox_constituency"] = 4900, ["Infobox_country"] = 6000, ["Infobox_country/formernext"] = 5800, ["Infobox_country/imagetable"] = 4900, ["Infobox_country/multirow"] = 7800, ["Infobox_country/status_text"] = 2600, ["Infobox_country/styles.css"] = 6000, ["Infobox_country_at_games"] = 14000, ["Infobox_country_at_games/core"] = 14000, ["Infobox_country_at_games/see_also"] = 11000, ["Infobox_court_case"] = 4400, ["Infobox_court_case/images"] = 2300, ["Infobox_cricket_tournament"] = 2100, ["Infobox_cricketer"] = 32000, ["Infobox_cricketer/career"] = 32000, ["Infobox_cricketer/national_side"] = 7600, ["Infobox_criminal"] = 5600, ["Infobox_curler"] = 2500, ["Infobox_cycling_race_report"] = 4300, ["Infobox_cyclist"] = 16000, ["Infobox_dam"] = 5300, ["Infobox_designation_list"] = 18000, ["Infobox_designation_list/entry"] = 16000, ["Infobox_dim"] = 6500, ["Infobox_dim/core"] = 6500, ["Infobox_diocese"] = 3800, ["Infobox_drug"] = 9000, ["Infobox_drug/chemical_formula"] = 9100, ["Infobox_drug/data_page_link"] = 9100, ["Infobox_drug/formatATC"] = 8900, ["Infobox_drug/formatCASnumber"] = 9100, ["Infobox_drug/formatChEBI"] = 9100, ["Infobox_drug/formatChEMBL"] = 9100, ["Infobox_drug/formatChemDBNIAID"] = 9100, ["Infobox_drug/formatChemSpider"] = 9100, ["Infobox_drug/formatCompTox"] = 9100, ["Infobox_drug/formatDrugBank"] = 9100, ["Infobox_drug/formatIUPHARBPS"] = 9100, ["Infobox_drug/formatJmol"] = 9100, ["Infobox_drug/formatKEGG"] = 9100, ["Infobox_drug/formatPDBligand"] = 8400, ["Infobox_drug/formatPubChemCID"] = 9100, ["Infobox_drug/formatPubChemSID"] = 9100, ["Infobox_drug/formatUNII"] = 9100, ["Infobox_drug/legal_status"] = 9200, ["Infobox_drug/licence"] = 9100, ["Infobox_drug/maintenance_categories"] = 9100, ["Infobox_drug/pregnancy_category"] = 9100, ["Infobox_drug/title"] = 9100, ["Infobox_election"] = 26000, ["Infobox_election/row"] = 26000, ["Infobox_election/shortname"] = 25000, ["Infobox_enzyme"] = 5100, ["Infobox_ethnic_group"] = 6900, ["Infobox_event"] = 4600, ["Infobox_figure_skater"] = 4100, ["Infobox_film"] = 150000, ["Infobox_film/short_description"] = 146000, ["Infobox_film_awards"] = 2400, ["Infobox_film_awards/link"] = 2400, ["Infobox_film_awards/style"] = 2400, ["Infobox_food"] = 6600, ["Infobox_football_biography"] = 200000, ["Infobox_football_club"] = 26000, ["Infobox_football_club_season"] = 19000, ["Infobox_football_league"] = 2500, ["Infobox_football_league_season"] = 18000, ["Infobox_football_match"] = 5500, ["Infobox_football_tournament_season"] = 6900, ["Infobox_former_subdivision"] = 3200, ["Infobox_former_subdivision/styles.css"] = 3200, ["Infobox_game"] = 2300, ["Infobox_game_score"] = 3300, ["Infobox_gene"] = 13000, ["Infobox_given_name"] = 3900, ["Infobox_golfer"] = 4200, ["Infobox_golfer/highest_ranking"] = 4200, ["Infobox_government_agency"] = 9700, ["Infobox_government_cabinet"] = 2300, ["Infobox_gridiron_football_person"] = 2800, ["Infobox_gridiron_football_person/position"] = 5900, ["Infobox_gymnast"] = 3200, ["Infobox_handball_biography"] = 4700, ["Infobox_historic_site"] = 10000, ["Infobox_horseraces"] = 2500, ["Infobox_hospital"] = 6100, ["Infobox_hospital/care_system"] = 6100, ["Infobox_hospital/lists"] = 6100, ["Infobox_ice_hockey_biography"] = 19000, ["Infobox_ice_hockey_player"] = 19000, ["Infobox_ice_hockey_team"] = 2200, ["Infobox_ice_hockey_team_season"] = 2000, ["Infobox_information_appliance"] = 2200, ["Infobox_international_football_competition"] = 5400, ["Infobox_islands"] = 8400, ["Infobox_islands/area"] = 8800, ["Infobox_islands/density"] = 8800, ["Infobox_islands/length"] = 8400, ["Infobox_islands/styles.css"] = 8400, ["Infobox_journal"] = 9500, ["Infobox_journal/Abbreviation_search"] = 9400, ["Infobox_journal/Bluebook_check"] = 9200, ["Infobox_journal/Former_check"] = 9200, ["Infobox_journal/ISO_4_check"] = 9200, ["Infobox_journal/ISSN-eISSN"] = 9200, ["Infobox_journal/Indexing_search"] = 9300, ["Infobox_journal/MathSciNet_check"] = 9200, ["Infobox_journal/NLM_check"] = 9200, ["Infobox_journal/frequency"] = 8300, ["Infobox_judge"] = 2300, ["Infobox_lake"] = 4600, ["Infobox_language"] = 9300, ["Infobox_language/family-color"] = 11000, ["Infobox_language/genetic"] = 6500, ["Infobox_language/linguistlist"] = 9400, ["Infobox_language/ref"] = 6900, ["Infobox_legislature"] = 3400, ["Infobox_library"] = 2000, ["Infobox_lighthouse"] = 2600, ["Infobox_lighthouse/light"] = 2600, ["Infobox_locomotive"] = 4800, ["Infobox_magazine"] = 7300, ["Infobox_manner_of_address"] = 3200, ["Infobox_mapframe"] = 75000, ["Infobox_martial_artist"] = 5500, ["Infobox_martial_artist/record"] = 5500, ["Infobox_medal_templates"] = 409000, ["Infobox_medical_condition"] = 9700, ["Infobox_medical_condition_(new)"] = 8200, ["Infobox_military_conflict"] = 20000, ["Infobox_military_installation"] = 9200, ["Infobox_military_person"] = 42000, ["Infobox_military_unit"] = 25000, ["Infobox_mine"] = 2100, ["Infobox_model"] = 2300, ["Infobox_mountain"] = 27000, ["Infobox_museum"] = 9600, ["Infobox_musical_artist"] = 118000, ["Infobox_musical_artist/color"] = 118000, ["Infobox_musical_artist/hCard_class"] = 304000, ["Infobox_musical_composition"] = 2600, ["Infobox_name"] = 7200, ["Infobox_name_module"] = 11000, ["Infobox_newspaper"] = 9200, ["Infobox_nobility"] = 2400, ["Infobox_noble"] = 6700, ["Infobox_officeholder"] = 198000, ["Infobox_officeholder/office"] = 203000, ["Infobox_official_post"] = 7300, ["Infobox_organization"] = 34000, ["Infobox_pageant_titleholder"] = 2800, ["Infobox_park"] = 6900, ["Infobox_person"] = 443000, ["Infobox_person/Wikidata"] = 4500, ["Infobox_person/height"] = 110000, ["Infobox_person/length"] = 6800, ["Infobox_person/weight"] = 75000, ["Infobox_philosopher"] = 3200, ["Infobox_planet"] = 4600, ["Infobox_play"] = 3600, ["Infobox_political_party"] = 13000, ["Infobox_power_station"] = 2900, ["Infobox_prepared_food"] = 3400, ["Infobox_professional_wrestler"] = 4100, ["Infobox_professional_wrestling_event"] = 2400, ["Infobox_protected_area"] = 14000, ["Infobox_protein_family"] = 2100, ["Infobox_publisher"] = 2300, ["Infobox_racehorse"] = 5400, ["Infobox_racing_driver"] = 3400, ["Infobox_radio_station"] = 22000, ["Infobox_rail"] = 2800, ["Infobox_rail_line"] = 6900, ["Infobox_rail_line/tracking"] = 6900, ["Infobox_rail_service"] = 2800, ["Infobox_rail_service/doc"] = 2800, ["Infobox_reality_competition_season"] = 3100, ["Infobox_record_label"] = 4000, ["Infobox_recurring_event"] = 6000, ["Infobox_religious_biography"] = 4700, ["Infobox_religious_building"] = 11000, ["Infobox_religious_building/color"] = 16000, ["Infobox_restaurant"] = 2000, ["Infobox_river"] = 29000, ["Infobox_river/calcunit"] = 29000, ["Infobox_river/discharge"] = 29000, ["Infobox_river/row-style"] = 29000, ["Infobox_river/source"] = 29000, ["Infobox_road"] = 24000, ["Infobox_road/banner"] = 13000, ["Infobox_road/hide/cities"] = 2200, ["Infobox_road/meta/errors"] = 24000, ["Infobox_road/meta/mask/category"] = 24000, ["Infobox_road/meta/mask/country"] = 24000, ["Infobox_road/meta/mask/subtype1"] = 13000, ["Infobox_road/meta/mask/subtype2"] = 12000, ["Infobox_road/name/USA"] = 13000, ["Infobox_road/name/USA/StateName"] = 5300, ["Infobox_road/shield/USA"] = 13000, ["Infobox_road/shieldmain/USA"] = 13000, ["Infobox_road/styles.css"] = 25000, ["Infobox_road_small"] = 2200, ["Infobox_rockunit"] = 6400, ["Infobox_royalty"] = 20000, ["Infobox_royalty/short_description"] = 13000, ["Infobox_rugby_biography"] = 15000, ["Infobox_rugby_biography/correct_date"] = 15000, ["Infobox_rugby_biography/depcheck"] = 6700, ["Infobox_rugby_league_biography"] = 9500, ["Infobox_rugby_league_biography/PLAYER"] = 9400, ["Infobox_rugby_team"] = 2600, ["Infobox_sailboat_specifications"] = 2000, ["Infobox_saint"] = 4800, ["Infobox_school"] = 38000, ["Infobox_school/short_description"] = 38000, ["Infobox_school_district"] = 5600, ["Infobox_school_district/styles.css"] = 5600, ["Infobox_scientist"] = 45000, ["Infobox_service_record"] = 2600, ["Infobox_settlement"] = 547000, ["Infobox_settlement/areadisp"] = 228000, ["Infobox_settlement/columns"] = 90000, ["Infobox_settlement/columns/styles.css"] = 90000, ["Infobox_settlement/densdisp"] = 416000, ["Infobox_settlement/impus"] = 80000, ["Infobox_settlement/lengthdisp"] = 165000, ["Infobox_settlement/link"] = 90000, ["Infobox_settlement/metric"] = 203000, ["Infobox_settlement/pref"] = 283000, ["Infobox_settlement/styles.css"] = 547000, ["Infobox_ship_begin"] = 40000, ["Infobox_ship_career"] = 36000, ["Infobox_ship_characteristics"] = 40000, ["Infobox_ship_class_overview"] = 4000, ["Infobox_ship_image"] = 39000, ["Infobox_shopping_mall"] = 3300, ["Infobox_short_story"] = 2200, ["Infobox_skier"] = 2600, ["Infobox_soap_character"] = 2900, ["Infobox_software"] = 14000, ["Infobox_software/simple"] = 14000, ["Infobox_song"] = 73000, ["Infobox_song/color"] = 73000, ["Infobox_song/link"] = 73000, ["Infobox_spaceflight"] = 3500, ["Infobox_spaceflight/styles.css"] = 3500, ["Infobox_sports_competition_event"] = 14000, ["Infobox_sports_competition_event/medalrow"] = 9200, ["Infobox_sports_league"] = 4800, ["Infobox_sports_season"] = 4600, ["Infobox_sports_team"] = 2300, ["Infobox_sportsperson"] = 104000, ["Infobox_stadium"] = 3900, ["Infobox_station"] = 54000, ["Infobox_station/doc"] = 54000, ["Infobox_station/services"] = 54000, ["Infobox_station/styles.css"] = 54000, ["Infobox_street"] = 3100, ["Infobox_swimmer"] = 9300, ["Infobox_television"] = 54000, ["Infobox_television_channel"] = 6200, ["Infobox_television_episode"] = 11000, ["Infobox_television_episode/styles.css"] = 11000, ["Infobox_television_season"] = 8900, ["Infobox_television_station"] = 3600, ["Infobox_tennis_biography"] = 9500, ["Infobox_tennis_event"] = 2200, ["Infobox_tennis_tournament_event"] = 17000, ["Infobox_tennis_tournament_year"] = 8600, ["Infobox_tennis_tournament_year/color"] = 26000, ["Infobox_tennis_tournament_year/footer"] = 26000, ["Infobox_train"] = 2200, ["Infobox_tropical_cyclone"] = 2200, ["Infobox_union"] = 2200, ["Infobox_university"] = 26000, ["Infobox_user"] = 2600, ["Infobox_venue"] = 17000, ["Infobox_video_game"] = 27000, ["Infobox_volleyball_biography"] = 5100, ["Infobox_weapon"] = 7100, ["Infobox_website"] = 7600, ["Infobox_writer"] = 36000, ["Information"] = 110000, ["Information/styles.css"] = 110000, ["Input_link"] = 33000, ["Instagram"] = 9000, ["Interlanguage_link"] = 130000, ["Interlanguage_link_multi"] = 20000, ["Internet_Archive_author"] = 18000, ["Internet_Archive_film"] = 2400, ["Intitle"] = 11000, ["Invalid_SVG"] = 3900, ["Invalid_SVG/styles.css"] = 3900, ["Ipsock"] = 12000, ["Iptalk"] = 22000, ["IranCensus2006"] = 54000, ["IranNCSGN"] = 3300, ["Iran_Census_2006"] = 54000, ["Irc"] = 2100, ["Irish_place_name"] = 2500, ["IsValidPageName"] = 127000, ["Is_country_in_Central_America"] = 13000, ["Is_country_in_the_Caribbean"] = 13000, ["Is_interwiki_link"] = 6000, ["Is_italic_taxon"] = 426000, ["Isbn"] = 5900, ["Isfdb_name"] = 4000, ["Isfdb_title"] = 4400, ["Isnumeric"] = 194000, ["Iso2continent"] = 28000, ["Iso2country"] = 22000, ["Iso2country/article"] = 22000, ["Iso2country/data"] = 22000, ["Iso2nationality"] = 65000, ["Issubst"] = 78000, ["Isu_name"] = 2200, ["Italic_dab2"] = 5000, ["Italic_title"] = 759000, ["Italic_title_prefixed"] = 8600, ["Italics_colon"] = 3100, ["Italictitle"] = 4600, ["Ivm"] = 5800, ["Ivm/styles.css"] = 5800, ["Ivmbox"] = 119000, ["Ivory_messagebox"] = 129000, ["Module:I18n/complex_date"] = 67000, ["Module:IP"] = 110000, ["Module:IPA_symbol"] = 4200, ["Module:IPA_symbol/data"] = 4200, ["Module:IPAc-en"] = 45000, ["Module:IPAc-en/data"] = 45000, ["Module:IPAc-en/phonemes"] = 45000, ["Module:IPAc-en/pronunciation"] = 45000, ["Module:IPAddress"] = 132000, ["Module:ISO_3166"] = 710000, ["Module:ISO_3166/data/AT"] = 2500, ["Module:ISO_3166/data/BA"] = 3400, ["Module:ISO_3166/data/CA"] = 2600, ["Module:ISO_3166/data/DE"] = 14000, ["Module:ISO_3166/data/ES"] = 3500, ["Module:ISO_3166/data/FR"] = 38000, ["Module:ISO_3166/data/GB"] = 6300, ["Module:ISO_3166/data/GR"] = 3000, ["Module:ISO_3166/data/IN"] = 28000, ["Module:ISO_3166/data/National"] = 710000, ["Module:ISO_3166/data/RS"] = 3200, ["Module:ISO_3166/data/RU"] = 24000, ["Module:ISO_3166/data/TR"] = 2300, ["Module:ISO_3166/data/US"] = 83000, ["Module:ISO_639_name"] = 13000, ["Module:ISOdate"] = 67000, ["Module:Icon"] = 546000, ["Module:Icon/data"] = 546000, ["Module:If_empty"] = 2860000, ["Module:If_in_page"] = 7300, ["Module:If_preview"] = 450000, ["Module:If_preview/configuration"] = 450000, ["Module:If_preview/styles.css"] = 450000, ["Module:Import_style"] = 12000, ["Module:In_lang"] = 342000, ["Module:Indent"] = 3900, ["Module:Infobox"] = 3910000, ["Module:Infobox/dates"] = 63000, ["Module:Infobox/styles.css"] = 4170000, ["Module:Infobox3cols"] = 290000, ["Module:InfoboxImage"] = 4200000, ["Module:Infobox_body_of_water_tracking"] = 17000, ["Module:Infobox_cyclist_tracking"] = 16000, ["Module:Infobox_gene"] = 13000, ["Module:Infobox_mapframe"] = 365000, ["Module:Infobox_military_conflict"] = 20000, ["Module:Infobox_military_conflict/styles.css"] = 20000, ["Module:Infobox_multi-lingual_name"] = 18000, ["Module:Infobox_multi-lingual_name/data"] = 18000, ["Module:Infobox_power_station"] = 2900, ["Module:Infobox_road"] = 25000, ["Module:Infobox_road/browselinks"] = 25000, ["Module:Infobox_road/length"] = 25000, ["Module:Infobox_road/locations"] = 24000, ["Module:Infobox_road/map"] = 25000, ["Module:Infobox_road/route"] = 25000, ["Module:Infobox_road/sections"] = 24000, ["Module:Infobox_television"] = 54000, ["Module:Infobox_television_disambiguation_check"] = 61000, ["Module:Infobox_television_episode"] = 11000, ["Module:Infobox_television_season_disambiguation_check"] = 8400, ["Module:Infobox_television_season_name"] = 8900, ["Module:Internet_Archive"] = 18000, ["Module:IrelandByCountyCatNav"] = 2500, ["Module:Is_infobox_in_lead"] = 370000, ["Module:Is_instance"] = 2400, ["Module:Italic_title"] = 1070000, ["Module:Italic_title2"] = 5000, } 264b4ea90fb01775a9d1617d67df8fa1e9815ba7 MediaWiki:Common.css 8 4 207 166 2022-08-01T10:53:31Z 17ademoladav 2 css text/css /* * This is the CSS common to all desktop skins on en.Wikipedia. * Styling inside .mw-parser-output should generally use TemplateStyles. */ /* Reset italic styling set by user agent */ cite, dfn { font-style: inherit; } /* Straight quote marks for <q> */ q { quotes: '"' '"' "'" "'"; } /* Avoid collision of blockquote with floating elements by swapping margin and padding */ blockquote { overflow: hidden; margin: 1em 0; padding: 0 40px; } /* Consistent size for <small>, <sub> and <sup> */ small { font-size: 85%; } .mw-body-content sub, .mw-body-content sup, span.reference /* for Parsoid */ { font-size: 80%; } /* Same spacing for indented and unindented paragraphs on talk pages */ .ns-talk .mw-body-content dd { margin-top: 0.4em; margin-bottom: 0.4em; } /* Reduce page jumps by hiding collapsed/dismissed content */ .client-js .mw-special-Watchlist #watchlist-message, .client-js .collapsible:not( .mw-made-collapsible).collapsed > tbody > tr:not(:first-child), /* Hide charinsert base for those not using the gadget */ #editpage-specialchars { display: none; } /* Adds padding above Watchlist announcements where new recentchanges/watchlist filters are enabled */ .mw-rcfilters-enabled .mw-specialpage-summary { margin-top: 1em; } /* Make the list of references smaller * Keep in sync with Template:Refbegin/styles.css * And Template:Reflist/styles.css */ ol.references { font-size: 90%; margin-bottom: 0.5em; } /* Styling for jQuery makeCollapsible, matching that of collapseButton */ .mw-parser-output .mw-collapsible-toggle:not(.mw-ui-button) { font-weight: normal; /* @noflip */ text-align: right; padding-right: 0.2em; padding-left: 0.2em; } .mw-collapsible-leftside-toggle .mw-collapsible-toggle { /* @noflip */ float: left; /* @noflip */ text-align: left; } /* Lists in wikitable data cells are always left-aligned */ .wikitable td ul, .wikitable td ol, .wikitable td dl { /* @noflip */ text-align: left; } /* Fix for hieroglyphs specificity issue in infoboxes ([[phab:T43869]]) */ .mw-parser-output table.mw-hiero-table td { vertical-align: middle; } /* Change the external link icon to a PDF icon for all PDF files */ .mw-parser-output a[href$=".pdf"].external, .mw-parser-output a[href*=".pdf?"].external, .mw-parser-output a[href*=".pdf#"].external, .mw-parser-output a[href$=".PDF"].external, .mw-parser-output a[href*=".PDF?"].external, .mw-parser-output a[href*=".PDF#"].external { background: url("//upload.wikimedia.org/wikipedia/commons/4/4d/Icon_pdf_file.png") no-repeat right; /* @noflip */ padding: 8px 18px 8px 0; } /* System messages styled similarly to fmbox */ div.mw-warning-with-logexcerpt, div.mw-lag-warn-high, div.mw-cascadeprotectedwarning, div#mw-protect-cascadeon, div.titleblacklist-warning { clear: both; margin: 0.2em 0; border: 1px solid #bb7070; background-color: #ffdbdb; padding: 0.25em 0.9em; box-sizing: border-box; } /* default colors for partial block message */ .mw-contributions-blocked-notice-partial .mw-warning-with-logexcerpt { border-color: #fc3; background-color: #fef6e7; } /* Increase the height of the image upload box */ #wpUploadDescription { height: 13em; } /* Minimum thumb width */ .thumbinner { min-width: 100px; } /* Prevent floating boxes from overlapping any category listings, file histories, edit previews, and edit [Show changes] views. */ #mw-subcategories, #mw-pages, #mw-category-media, #filehistory, #wikiPreview, #wikiDiff { clear: both; } /* Styling for Abuse Filter tags */ .mw-tag-markers { font-style: italic; font-size: 90%; } /* Hide stuff meant for accounts with special permissions. Made visible again in [[MediaWiki:Group-checkuser.css]], [[MediaWiki:Group-sysop.css]], [[MediaWiki:Group-abusefilter.css]], [[MediaWiki:Group-abusefilter-helper.css]], [[MediaWiki:Group-patroller.css]], [[MediaWiki:Group-templateeditor.css]], [[MediaWiki:Group-extendedmover.css]], [[MediaWiki:Group-extendedconfirmed.css]], and [[Mediawiki:Group-autoconfirmed.css]]. */ .checkuser-show, .sysop-show, .abusefilter-show, .abusefilter-helper-show, .patroller-show, .templateeditor-show, .extendedmover-show, .extendedconfirmed-show, .autoconfirmed-show, .user-show { display: none; } /* Hide the redlink generated by {{Editnotice}}, this overrides the ".sysop-show { display: none; }" above that applies to the same link as well. See [[phab:T45013]] Hide the images in editnotices to keep them readable in VE view. Long term, editnotices should become a core feature so that they can be designed responsive. */ .ve-ui-mwNoticesPopupTool-item .editnotice-redlink, .ve-ui-mwNoticesPopupTool-item .mbox-image, .ve-ui-mwNoticesPopupTool-item .mbox-imageright { display: none !important; } /* Remove bullets when there are multiple edit page warnings */ ul.permissions-errors { margin: 0; } ul.permissions-errors > li { list-style: none; } /* larger inline math */ span.mwe-math-mathml-inline { font-size: 118%; } /* Make <math display="block"> be left aligned with one space indent for * compatibility with style conventions */ .mwe-math-fallback-image-display, .mwe-math-mathml-display { margin-left: 1.6em !important; margin-top: 0.6em; margin-bottom: 0.6em; } .mwe-math-mathml-display math { display: inline; } @media screen { /* Gallery styles background changes are restricted to screen view. In printing we should avoid applying backgrounds. */ /* The backgrounds for galleries. */ #content .gallerybox div.thumb { /* Light gray padding */ background-color: #f8f9fa; } /* Put a chequered background behind images, only visible if they have transparency. '.filehistory a img' and '#file img:hover' are handled by MediaWiki core (as of 1.19) */ .gallerybox .thumb img { background: #fff url(//upload.wikimedia.org/wikipedia/commons/5/5d/Checker-16x16.png) repeat; } /* But not on articles, user pages, or portals. */ .ns-0 .gallerybox .thumb img, .ns-2 .gallerybox .thumb img, .ns-100 .gallerybox .thumb img { background-image: none; } /* Display "From Wikipedia, the free encyclopedia" in skins that support it, do not apply to print mode */ #siteSub { display: block; } } /* Hide FlaggedRevs notice UI when there are no pending changes */ .flaggedrevs_draft_synced, .flaggedrevs_stable_synced, /* "Temporary" to remove links in sidebar T255381 */ #t-upload, /* Hide broken download box on Special:Book pending T285400 */ .mw-special-Book #coll-downloadbox { display: none; } /* * BELOW HERE THERE BE SOONTOBE TEMPLATESTYLES THINGS; * SEE [[MediaWiki talk:Common.css/to do]] */ /* Style for horizontal lists (separator following item). @source mediawiki.org/wiki/Snippets/Horizontal_lists @revision 8 (2016-05-21) @author [[User:Edokter]] */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { margin: 0; /* don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again */ display: inline; } /* Display nested lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* Generate interpuncts */ .hlist dt:after { content: ": "; } /** * Note hlist style usage differs in Minerva and is defined in core as well! * Please check Minerva desktop (and Minerva.css) when changing * See https://phabricator.wikimedia.org/T213239 */ .hlist dd:after, .hlist li:after { content: " · "; font-weight: bold; } .hlist dd:last-child:after, .hlist dt:last-child:after, .hlist li:last-child:after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child:before, .hlist dd dt:first-child:before, .hlist dd li:first-child:before, .hlist dt dd:first-child:before, .hlist dt dt:first-child:before, .hlist dt li:first-child:before, .hlist li dd:first-child:before, .hlist li dt:first-child:before, .hlist li li:first-child:before { content: " ("; font-weight: normal; } .hlist dd dd:last-child:after, .hlist dd dt:last-child:after, .hlist dd li:last-child:after, .hlist dt dd:last-child:after, .hlist dt dt:last-child:after, .hlist dt li:last-child:after, .hlist li dd:last-child:after, .hlist li dt:last-child:after, .hlist li li:last-child:after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li:before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child:before, .hlist dt ol > li:first-child:before, .hlist li ol > li:first-child:before { content: " (" counter(listitem) "\a0"; } /* Unbulleted lists */ .plainlist ol, .plainlist ul { line-height: inherit; list-style: none; margin: 0; } .plainlist ol li, .plainlist ul li { margin-bottom: 0; } /* Infobox template style */ .infobox { border: 1px solid #a2a9b1; border-spacing: 3px; background-color: #f8f9fa; color: black; /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; font-size: 88%; line-height: 1.5em; width: 22em; } .infobox-header, .infobox-label, .infobox-above, .infobox-full-data, .infobox-data, .infobox-below, .infobox-subheader, .infobox-image, .infobox-navbar, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox th, .infobox td { vertical-align: top; } .infobox-label, .infobox-data, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox th, .infobox td { /* @noflip */ text-align: left; } /* Remove .infobox when element selectors above are removed */ .infobox .infobox-above, .infobox .infobox-title, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox caption { font-size: 125%; font-weight: bold; text-align: center; } .infobox-title, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox caption { padding: 0.2em; } /* Remove .infobox when element selectors above are removed */ .infobox .infobox-header, .infobox .infobox-subheader, .infobox .infobox-image, .infobox .infobox-full-data, .infobox .infobox-below { text-align: center; } /* Remove .infobox when element selectors above are removed */ .infobox .infobox-navbar { /* @noflip */ text-align: right; } /* Normal font styling for wikitable row headers with scope="row" tag */ .wikitable.plainrowheaders th[scope=row], .wikitable.plainrowheaders th[scope=rowgroup] { font-weight: normal; /* @noflip */ text-align: left; } /* ambox/tmbox/imbox/cmbox/ombox/fmbox message boxes */ th.mbox-text, td.mbox-text { /* The message body cell(s) */ border: none; /* @noflip */ padding: 0.25em 0.9em; /* 0.9em left/right */ width: 100%; /* Make all mboxes the same width regardless of text length */ } td.mbox-image { /* The left image cell */ border: none; /* @noflip */ padding: 2px 0 2px 0.9em; /* 0.9em left, 0px right */ text-align: center; } td.mbox-imageright { /* The right image cell */ border: none; /* @noflip */ padding: 2px 0.9em 2px 0; /* 0px left, 0.9em right */ text-align: center; } td.mbox-empty-cell { /* An empty narrow cell */ border: none; padding: 0; width: 1px; } /* Article message box styles */ table.ambox { margin: 0 10%; /* 10% = Will not overlap with other elements */ border: 1px solid #a2a9b1; /* @noflip */ border-left: 10px solid #36c; /* Default "notice" blue */ background-color: #fbfbfb; box-sizing: border-box; } /* Single border between stacked boxes. */ table.ambox + table.ambox, table.ambox + .mw-empty-elt + table.ambox { margin-top: -1px; } .ambox th.mbox-text, .ambox td.mbox-text { /* The message body cell(s) */ padding: 0.25em 0.5em; /* 0.5em left/right */ } .ambox td.mbox-image { /* The left image cell */ /* @noflip */ padding: 2px 0 2px 0.5em; /* 0.5em left, 0px right */ } .ambox td.mbox-imageright { /* The right image cell */ /* @noflip */ padding: 2px 0.5em 2px 0; /* 0px left, 0.5em right */ } table.ambox-notice { /* @noflip */ border-left: 10px solid #36c; /* Blue */ } table.ambox-speedy { /* @noflip */ border-left: 10px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } table.ambox-delete { /* @noflip */ border-left: 10px solid #b32424; /* Red */ } table.ambox-content { /* @noflip */ border-left: 10px solid #f28500; /* Orange */ } table.ambox-style { /* @noflip */ border-left: 10px solid #fc3; /* Yellow */ } table.ambox-move { /* @noflip */ border-left: 10px solid #9932cc; /* Purple */ } table.ambox-protection { /* @noflip */ border-left: 10px solid #a2a9b1; /* Gray-gold */ } /* Image message box styles */ table.imbox { margin: 4px 10%; border-collapse: collapse; border: 3px solid #36c; /* Default "notice" blue */ background-color: #fbfbfb; box-sizing: border-box; } .imbox .mbox-text .imbox { /* For imboxes inside imbox-text cells. */ margin: 0 -0.5em; /* 0.9 - 0.5 = 0.4em left/right. */ display: block; /* Fix for webkit to force 100% width. */ } .mbox-inside .imbox { /* For imboxes inside other templates. */ margin: 4px; } table.imbox-notice { border: 3px solid #36c; /* Blue */ } table.imbox-speedy { border: 3px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } table.imbox-delete { border: 3px solid #b32424; /* Red */ } table.imbox-content { border: 3px solid #f28500; /* Orange */ } table.imbox-style { border: 3px solid #fc3; /* Yellow */ } table.imbox-move { border: 3px solid #9932cc; /* Purple */ } table.imbox-protection { border: 3px solid #a2a9b1; /* Gray-gold */ } table.imbox-license { border: 3px solid #88a; /* Dark gray */ background-color: #f7f8ff; /* Light gray */ } table.imbox-featured { border: 3px solid #cba135; /* Brown-gold */ } /* Category message box styles */ table.cmbox { margin: 3px 10%; border-collapse: collapse; border: 1px solid #a2a9b1; background-color: #dfe8ff; /* Default "notice" blue */ box-sizing: border-box; } table.cmbox-notice { background-color: #d8e8ff; /* Blue */ } table.cmbox-speedy { margin-top: 4px; margin-bottom: 4px; border: 4px solid #b32424; /* Red */ background-color: #ffdbdb; /* Pink */ } table.cmbox-delete { background-color: #ffdbdb; /* Pink */ } table.cmbox-content { background-color: #ffe7ce; /* Orange */ } table.cmbox-style { background-color: #fff9db; /* Yellow */ } table.cmbox-move { background-color: #e4d8ff; /* Purple */ } table.cmbox-protection { background-color: #efefe1; /* Gray-gold */ } /* Other pages message box styles */ table.ombox { margin: 4px 10%; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; } table.ombox-notice { border: 1px solid #a2a9b1; /* Gray */ } table.ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } table.ombox-delete { border: 2px solid #b32424; /* Red */ } table.ombox-content { border: 1px solid #f28500; /* Orange */ } table.ombox-style { border: 1px solid #fc3; /* Yellow */ } table.ombox-move { border: 1px solid #9932cc; /* Purple */ } table.ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } /* Talk page message box styles */ table.tmbox { margin: 4px 10%; border-collapse: collapse; border: 1px solid #c0c090; /* Default "notice" gray-brown */ background-color: #f8eaba; min-width: 80%; box-sizing: border-box; } .tmbox.mbox-small { min-width: 0; /* reset the min-width of tmbox above */ } .mediawiki .mbox-inside .tmbox { /* For tmboxes inside other templates. The "mediawiki" class ensures that */ margin: 2px 0; /* this declaration overrides other styles (including mbox-small above) */ width: 100%; /* For Safari and Opera */ } .mbox-inside .tmbox.mbox-small { /* "small" tmboxes should not be small when */ line-height: 1.5em; /* also "nested", so reset styles that are */ font-size: 100%; /* set in "mbox-small" above. */ } table.tmbox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } table.tmbox-delete { border: 2px solid #b32424; /* Red */ } table.tmbox-content { border: 2px solid #f28500; /* Orange */ } table.tmbox-style { border: 2px solid #fc3; /* Yellow */ } table.tmbox-move { border: 2px solid #9932cc; /* Purple */ } table.tmbox-protection, table.tmbox-notice { border: 1px solid #c0c090; /* Gray-brown */ } /* Footer and header message box styles */ table.fmbox { clear: both; margin: 0.2em 0; width: 100%; border: 1px solid #a2a9b1; background-color: #f8f9fa; /* Default "system" gray */ box-sizing: border-box; } table.fmbox-system { background-color: #f8f9fa; } table.fmbox-warning { border: 1px solid #bb7070; /* Dark pink */ background-color: #ffdbdb; /* Pink */ } table.fmbox-editnotice { background-color: transparent; } /* These mbox-small classes must be placed after all other ambox/tmbox/ombox etc classes. "html body.mediawiki" is so they override "table.ambox + table.ambox" above. */ html body.mediawiki .mbox-small { /* For the "small=yes" option. */ /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; box-sizing: border-box; width: 238px; font-size: 88%; line-height: 1.25em; } html body.mediawiki .mbox-small-left { /* For the "small=left" option. */ /* @noflip */ margin: 4px 1em 4px 0; box-sizing: border-box; overflow: hidden; width: 238px; border-collapse: collapse; font-size: 88%; line-height: 1.25em; } /* Remove underlines from certain links */ .nounderlines a, .IPA a:link, .IPA a:visited { text-decoration: none !important; } /* Prevent line breaks in silly places where desired (nowrap) and links when we don't want them to (nowraplinks a) */ .nowrap, .nowraplinks a { white-space: nowrap; } /* But allow wrapping where desired: */ .wrap, .wraplinks a { white-space: normal; } /* texhtml class for inline math (based on generic times-serif class) */ span.texhtml { font-family: "Nimbus Roman No9 L", "Times New Roman", Times, serif; font-size: 118%; line-height: 1; white-space: nowrap; /* Force tabular and lining display for texhtml */ -webkit-font-feature-settings: "lnum", "tnum", "kern" 0; font-feature-settings: "lnum", "tnum", "kern" 0; font-variant-numeric: lining-nums tabular-nums; font-kerning: none; } span.texhtml span.texhtml { font-size: 100%; } @media screen { .nochecker .gallerybox .thumb img { background-image: none; } } /* Put anything you mean to be a sitewide addition above the TemplateStyles * comment above. */ 9975360511339f651543b766a5956a43628a12eb Template:Infobox legislature 10 78 209 208 2022-08-01T10:56:14Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{Infobox | bodyclass = vcard | abovestyle = font-size: 125%; {{#if:{{{background_color|}}}|border-top: 2px solid {{{background_color}}}; border-bottom: 2px solid {{{background_color}}}|background-color: #ededed}} | above = <includeonly><div style="display:inline" class="fn org">{{{name}}}</div> {{#if:{{{native_name|}}}|<br /><div style="display:inline" class="nickname" {{#if:{{{native_name_lang|}}}|lang="{{{native_name_lang}}}"}}>{{{native_name}}}</div>{{#if:{{{transcription_name|}}}|<br /><div style="display:inline" class="nickname">{{{transcription_name}}}</div>}}}}</includeonly> | subheader = {{{legislature|}}} | image = {{#invoke:InfoboxImage|InfoboxImage |image={{{coa_pic|{{{coa-pic|}}}}}} |size={{{coa_res|{{{coa-res|}}}}}} |sizedefault=frameless |upright=yes |alt={{{coa_alt|{{{coa-alt|Coat of arms or logo}}}}}} }} | caption = {{{coa_caption|}}} | image2 = {{#invoke:InfoboxImage |InfoboxImage |image={{{logo|{{{logo_pic|{{{logo-pic|}}}}}}}}} |size={{{logo_res|{{{logo-res|}}}}}} |sizedefault=frameless |upright=yes |alt={{{logo_alt|{{{logo-alt|Logo}}}}}} }} | caption2 = {{{logo_caption|}}} | headerstyle = {{#if:{{{background_color|}}}|border-top: 2px solid {{{background_color}}}; border-bottom: 2px solid {{{background_color}}}|background-color: #ededed}} | labelstyle = {{{labelstyle|}}} | header1 = {{#if:{{{house_type|}}}{{{houses|}}}{{{term_limits|}}}|Type}} | label2 = Type | data2 = {{#if:{{{house_type|}}} |<div style="padding:0.1em 0;line-height:1.3em;<!--(modified longitem)-->"><div style="display:inline" class="category">{{#ifexist:{{{house_type}}}|[[{{{house_type}}}]]|{{{house_type}}}}}</div> {{#if:{{{body|}}} |of the [[{{{body}}}]]}} {{#if:{{{jurisdiction|}}} |of [[{{{jurisdiction}}}]]}}</div>}} | label3 = {{#if:{{{houses|}}}|Houses|Chambers}} | data3 = {{#if:{{{houses|}}}|{{{houses}}}|{{{chambers|}}}}} | label4 = {{longitem|Term limits}} | data4 = {{{term_limits|}}} | header5 = {{#if:{{{foundation|}}}{{{disbanded|}}}{{{preceded_by|}}}{{{succeeded_by|}}}{{{new_session|}}}|History}} | label6 = {{#if:{{{foundation|}}}|Founded|Established}} | data6 = {{#if:{{{foundation|}}}|{{{foundation}}}|{{{established|}}}}} | label7 = Disbanded | data7 = {{{disbanded|}}} | label8 = Preceded&nbsp;by | data8 = {{{preceded_by|}}} | label9 = Succeeded&nbsp;by | data9 = {{{succeeded_by|}}} | label10 = {{longitem|New session started}} | data10 = {{{new_session|}}} | header14 = {{#if:{{{leader1|}}}{{{leader2|}}}{{{leader3|}}}{{{leader4|}}}{{{leader5|}}}{{{leader6|}}}{{{leader7|}}}{{{leader8|}}}|Leadership}} | label15 = {{longitem|{{{leader1_type|}}}}} | data15 = {{#if:{{{leader1|}}} |{{longitem|style=line-height:1.3em|{{{leader1|}}}{{#if:{{{party1|}}}|{{#ifeq:{{Str index|{{{party1|}}}|1}}|(||,}}&#32;{{{party1|}}}}} {{#if:{{{election1|}}}|<br/>since {{{election1|}}}|{{#if:{{{leader1_term|}}}|<br/>{{{leader1_term}}}}} }} }} }} | label16 = {{longitem|style=line-height:1.3em|{{{leader2_type|}}}}} | data16 = {{#if:{{{leader2|}}} |{{longitem|style=line-height:1.3em|{{{leader2|}}}{{#if:{{{party2|}}}|{{#ifeq:{{Str index|{{{party2|}}}|1}}|(||,}}&#32;{{{party2|}}}}} {{#if:{{{election2|}}}|<br/>since {{{election2|}}}|{{#if:{{{leader2_term|}}}|<br/>{{{leader2_term}}}}} }} }} }} | label17 = {{longitem|style=line-height:1.3em|{{{leader3_type|}}}}} | data17 = {{#if:{{{leader3|}}} |{{longitem|style=line-height:1.3em|{{{leader3|}}}{{#if:{{{party3|}}}|{{#ifeq:{{Str index|{{{party3|}}}|1}}|(||,}}&#32;{{{party3|}}}}} {{#if:{{{election3|}}}|<br/>since {{{election3|}}}|{{#if:{{{leader3_term|}}}|<br/>{{{leader3_term}}}}} }} }} }} | label18 = {{longitem|style=line-height:1.3em|{{{leader4_type|}}}}} | data18 = {{#if:{{{leader4|}}} |{{longitem|style=line-height:1.3em|{{{leader4|}}}{{#if:{{{party4|}}}|{{#ifeq:{{Str index|{{{party4|}}}|1}}|(||,}}&#32;{{{party4|}}}}} {{#if:{{{election4|}}}|<br/>since {{{election4|}}}|{{#if:{{{leader4_term|}}}|<br/>{{{leader4_term}}}}} }} }} }} | label19 = {{longitem|style=line-height:1.3em|{{{leader5_type|}}}}} | data19 = {{#if:{{{leader5|}}} |{{longitem|style=line-height:1.3em|{{{leader5|}}}{{#if:{{{party5|}}}|{{#ifeq:{{Str index|{{{party5|}}}|1}}|(||,}}&#32;{{{party5|}}}}} {{#if:{{{election5|}}}|<br/>since {{{election5|}}}|{{#if:{{{leader5_term|}}}|<br/>{{{leader5_term}}}}} }} }} }} | label20 = {{longitem|style=line-height:1.3em|{{{leader6_type|}}}}} | data20 = {{#if:{{{leader6|}}} |{{longitem|style=line-height:1.3em|{{{leader6|}}}{{#if:{{{party6|}}}|{{#ifeq:{{Str index|{{{party6|}}}|1}}|(||,}}&#32;{{{party6|}}}}} {{#if:{{{election6|}}}|<br/>since {{{election6|}}}|{{#if:{{{leader6_term|}}}|<br/>{{{leader6_term}}}}} }} }} }} | label21 = {{longitem|style=line-height:1.3em|{{{leader7_type|}}}}} | data21 = {{#if:{{{leader7|}}} |{{longitem|style=line-height:1.3em|{{{leader7|}}}{{#if:{{{party7|}}}|{{#ifeq:{{Str index|{{{party7|}}}|1}}|(||,}}&#32;{{{party7|}}}}} {{#if:{{{election7|}}}|<br/>since {{{election7|}}}|{{#if:{{{leader7_term|}}}|<br/>{{{leader7_term}}}}} }} }} }} | label22 = {{longitem|style=line-height:1.3em|{{{leader8_type|}}}}} | data22 = {{#if:{{{leader8|}}} |{{longitem|style=line-height:1.3em|{{{leader8|}}}{{#if:{{{party8|}}}|{{#ifeq:{{Str index|{{{party8|}}}|1}}|(||,}}&#32;{{{party8|}}}}} {{#if:{{{election8|}}}|<br/>since {{{election8|}}}|{{#if:{{{leader8_term|}}}|<br/>{{{leader8_term}}}}} }} }} }} | label23 = {{longitem|style=line-height:1.3em|{{{leader9_type|}}}}} | data23 = {{#if:{{{leader9|}}} |{{longitem|style=line-height:1.3em|{{{leader9|}}}{{#if:{{{party9|}}}|{{#ifeq:{{Str index|{{{party9|}}}|1}}|(||,}}&#32;{{{party9|}}}}} {{#if:{{{election9|}}}|<br/>since {{{election9|}}}|{{#if:{{{leader9_term|}}}|<br/>{{{leader9_term}}}}} }} }} }} | label24 = {{longitem|style=line-height:1.3em|{{{leader10_type|}}}}} | data24 = {{#if:{{{leader10|}}} |{{longitem|style=line-height:1.3em|{{{leader10|}}}{{#if:{{{party10|}}}|{{#ifeq:{{Str index|{{{party10|}}}|1}}|(||,}}&#32;{{{party10|}}}}} {{#if:{{{election10|}}}|<br/>since {{{election10|}}}|{{#if:{{{leader10_term|}}}|<br/>{{{leader10_term}}}}} }} }} }} | header25 = {{#if:{{{structure1|}}}{{{political_groups1|}}}{{{structure2|}}}{{{political_groups2|}}}{{{committees1|}}}{{{committees2|}}}{{{joint_committees|}}}{{{term_length|}}}{{{authority|}}}{{{salary|}}} {{{seats1|}}}{{{seats2|}}}{{{seats3|}}}{{{seats4|}}}{{{seats5|}}}{{{seats6|}}}{{{seats7|}}}{{{seats8|}}}|Structure}} | label26 = Seats | data26 = {{#if:{{{members|}}}|{{{members}}}|{{{seats|}}}}} | data27 = {{#invoke:InfoboxImage|InfoboxImage|image={{{structure1|}}}|size={{{structure1_res|}}}|sizedefault=120px|alt={{{structure1_alt|}}}}} | label28 = {{longitem|{{#if:{{{house1|}}}|{{{house1}}} political groups|Political groups}}}} | data28 = {{{political_groups1|}}} | data29 = {{#invoke:InfoboxImage|InfoboxImage|image={{{structure2|}}}|size={{{structure2_res|}}}|sizedefault=120px|alt={{{structure2_alt|}}}}} | label30 = {{longitem|{{#if:{{{house2|}}}|{{{house2}}} political groups|Political groups}}}} | data30 = {{{political_groups2|}}} | label31 = {{#if:{{{house1|}}}|{{{house1}}} committees|Committees}} | data31 = {{{committees1|}}} | label32 = {{#if:{{{house2|}}}|{{{house2}}} committees|Committees}} | data32 = {{{committees2|}}} | label33 = {{longitem|Joint committees}} | data33 = {{{joint_committees|}}} | label34 = {{longitem|Length of term}} | data34 = {{{term_length|}}} | label35 = Authority | data35 = {{{authority|}}} | label36 = Salary | data36 = {{{salary|}}} | label37 = {{longitem|{{{seats1_title|}}}}} | data37 = {{{seats1|}}} | label38 = {{longitem|{{{seats2_title|}}}}} | data38 = {{{seats2|}}} | label39 = {{longitem|{{{seats3_title|}}}}} | data39 = {{{seats3|}}} | label40 = {{longitem|{{{seats4_title|}}}}} | data40 = {{{seats4|}}} | label41 = {{longitem|{{{seats5_title|}}}}} | data41 = {{{seats5|}}} | label42 = {{longitem|{{{seats6_title|}}}}} | data42 = {{{seats6|}}} | label43 = {{longitem|{{{seats7_title|}}}}} | data43 = {{{seats7|}}} | label44 = {{longitem|{{{seats8_title|}}}}} | data44 = {{{seats8|}}} | label45 = {{longitem|{{{seats9_title|}}}}} | data45 = {{{seats9|}}} | label46 = {{longitem|{{{seats10_title|}}}}} | data46 = {{{seats10|}}} | header47 = {{#if:{{{voting_system1|}}}{{{voting_system2|}}}{{{first_election1|}}}{{{first_election2|}}}{{{first_election3|}}}{{{last_election1|}}}{{{last_election2|}}}{{{last_election3|}}}{{{next_election1|}}}{{{next_election2|}}}{{{next_election3|}}}{{{redistricting|}}}|Elections}} | label48 = {{longitem|{{#if:{{{house1|}}}|{{{house1}}} [[electoral system|voting system]]|[[electoral system|Voting system]]}}}} | data48 = {{{voting_system1|}}} | label49 = {{longitem|{{#if:{{{house2|}}}|{{{house2}}} [[electoral system|voting system]]|[[electoral system|Voting system]]}}}} | data49 = {{{voting_system2|}}} | label50 = {{longitem|{{#if:{{{house1|}}}|{{{house1}}} first election|First election}}}} | data50 = {{{first_election1|}}} | label51 = {{longitem|{{#if:{{{house2|}}}|{{{house2}}} first election|First election}}}} | data51 = {{{first_election2|}}} | label52 = {{longitem|First general election}} | data52 = {{{first_election3|}}} | label53 = {{longitem|{{#if:{{{house1|}}}|{{{house1}}} last election|Last election}}}} | data53 = {{{last_election1|}}} | label54 = {{longitem|{{#if:{{{house2|}}}|{{{house2}}} last election|Last election}}}} | data54 = {{{last_election2|}}} | label55 = {{longitem|Last general election}} | data55 = {{{last_election3|}}} | label56 = {{longitem|{{#if:{{{house1|}}}|{{{house1}}} next election|Next election}}}} | data56 = {{{next_election1|}}} | label57 = {{longitem|{{#if:{{{house2|}}}|{{{house2}}} next election|Next election}}}} | data57 = {{{next_election2|}}} | label58 = {{longitem|Next general election}} | data58 = {{{next_election3|}}} | label59 = Redistricting | data59 = {{{redistricting|}}} | header60 = {{#if:{{{motto|}}}|Motto}} | data61 = {{{motto|}}} | header62 = {{#if:{{{session_room|}}}{{{meeting_place|}}}|Meeting place}} | data63 = {{#invoke:InfoboxImage|InfoboxImage|image={{{session_room|}}}|size={{{session_res|}}}|alt={{{session_alt|}}}}} | data64 = {{{meeting_place|}}} | class64 = label | data65 = {{#invoke:InfoboxImage|InfoboxImage|image={{{session_room2|}}}|size={{{session_res2|}}}|alt={{{session_alt2|}}}}} | data66 = {{{meeting_place2|}}} | class66 = label | data67 = {{#invoke:InfoboxImage|InfoboxImage|image={{{session_room3|}}}|size={{{session_res3|}}}|alt={{{session_alt3|}}}}} | data68 = {{{meeting_place3|}}} | class68 = label | header69 = {{#if:{{{website|}}}|Website}} | data70 = {{{website|}}} | header71 = {{#if:{{{constitution|}}}|Constitution}} | data72 = {{{constitution|}}} | header73 = {{#if:{{{rules|}}}|Rules}} | data74 = {{{rules|}}} | header75 = {{#if:{{{footnotes|}}}|Footnotes}} | data76 = {{{footnotes|}}} }}{{Main other|{{#if:{{{background_color|}}}{{{text_color|}}}|[[Category:Infobox legislature with background color]]}}}}{{#invoke:Check for unknown parameters|check|unknown={{main other|}}|preview=Page using [[Template:Infobox legislature]] with unknown parameter "_VALUE_"|ignoreblank=y| authority | background_color | body | categories | chambers | coa_alt | coa_caption | coa_pic | coa_res | coa-alt | coa-pic | coa-res | committees1 | committees2 | constitution | demo | disbanded | election1 | election2 | election3 | election4 | election5 | election6 | election7 | election8 | election9 | election10 | established | first_election1 | first_election2 | first_election3 | footnotes | foundation | house_type | house1 | house2 | houses | joint_committees | jurisdiction | labelstyle | last_election1 | last_election2 | last_election3 | leader1 | leader1_type | leader2 | leader2_type | leader3 | leader3_type | leader4 | leader4_type | leader5 | leader5_type | leader6 | leader6_type | leader7 | leader7_type | leader8 | leader8_type | leader9 | leader9_type | leader10 | leader10_type | legislature | logo | logo_alt | logo_caption | logo_pic | logo_res | logo-alt | logo-pic | logo-res | meeting_place | meeting_place2 | meeting_place3 | members | motto | name | native_name | native_name_lang | new_session | next_election1 | next_election2 | next_election3 | nocat | party1 | party2 | party3 | party4 | party5 | party6 | party7 | party8 | party9 | party10 | political_groups1 | political_groups2 | preceded_by | redistricting | rules | salary | seats | seats1 | seats1_title | seats2 | seats2_title | seats3 | seats3_title | seats4 | seats4_title | seats5 | seats5_title | seats6 | seats6_title | seats7 | seats7_title | seats8 | seats8_title | session_alt | session_alt2 | session_alt3 | session_res | session_res2 | session_res3 | session_room | session_room2 | session_room3 | structure1 | structure1_alt | structure1_res | structure2 | structure2_alt | structure2_res | succeeded_by | term_length | term_limits | text_color | transcription_name | voting_system1 | voting_system2 | website }}<noinclude> {{documentation}}<!--Please add this template's categories to the /doc subpage, not here - thanks!--> </noinclude> b00afd5d875cd23a8dd37d1a90c778bbf1c5a838 Template:Big 10 79 211 210 2022-08-01T10:56:16Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <span style="font-size: 120%;">{{{1}}}</span><noinclude> {{Documentation}} <!-- Please add categories to the /doc subpage; interwikis go to Wikidata, thank you. --> </noinclude> 921a29fc5d6c9a23b246400fe247ba4f2e0f2aaf Template:Category link with count 10 80 213 212 2022-08-01T10:56:17Z 17ademoladav 2 1 revision imported wikitext text/x-wiki [[:Category:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}|<!-- -->{{#if:{{{name|}}}|{{{name}}}|Category:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}}}<!-- -->]]&nbsp;({{PAGESINCATEGORY:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}|{{{2|all}}}}})<noinclude> {{Documentation}} </noinclude> f93f1540b8c157703bd6d24ae35c35bef745981d Template:Clc 10 81 215 214 2022-08-01T10:56:18Z 17ademoladav 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Category link with count]] 02280e2ab57b544236e11f913e3759c5781ca9d5 Template:Hlist 10 82 217 216 2022-08-01T10:56:20Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|horizontal}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 9e3824c2e3c0e0dbef2f37556ac0b994987fecf9 Template:Infobox legislature/doc 10 83 219 218 2022-08-01T10:56:23Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{Documentation subpage}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> {{lua|Module:Infobox|Module:InfoboxImage|Module:Check for unknown parameters}} Infobox to be used in articles about a [[legislature]] as a whole, or any [[Chambers of parliament|chamber]] found within a [[unicameralism|unicameral]], [[bicameralism|bicameral]], [[tricameralism|tricameral]] or [[tetracameralism|tetracameral]] assembly. == Usage == This is a template meant to be used in articles referring to legislatures (national, sub-national, federal, local, unicameral, bicameral, each of the chambers (if bicameral) or the whole body) that exist (currently function) or that don't exist (defunct legislative, disbanded ones). ===Syntax=== {{Parameter names example |_display=italics |name |native_name |native_name_lang |transcription_name |legislature |coa_pic=''<nowiki>coa_pic</nowiki>'' |coa_res |coa_alt |coa_caption |logo_pic=''<nowiki>logo_pic</nowiki>'' |logo_res |logo_alt |logo_caption |house_type=''<nowiki>house_type</nowiki>'' |body=''<nowiki>body</nowiki>'' |jurisdiction=''<nowiki>jurisdiction</nowiki>'' |houses |term_limits |foundation |disbanded |preceded_by |succeeded_by |new_session |leader1_type |leader1 |party1 |election1 |leader2_type |leader2 |party2 |election2 |leader3_type |leader3 |party3 |election3 |leader4_type |leader4 |party4 |election4 |leader5_type |leader5 |party5 |election5 |leader6_type |leader6 |party6 |election6 |leader7_type |leader7 |party7 |election7 |seats |house1 |house2 |structure1=''<nowiki>structure1</nowiki>'' |structure1_res=''structure1_res''<br /> |structure1_alt |structure2=''<nowiki>structure2</nowiki>'' |structure2_res=''structure2_res''<br /> |structure2_alt |political_groups1 |political_groups2 |committees1 |committees2 |joint_committees |term_length |authority |salary |seats1_title |seats1 |seats2_title |seats2 |seats3_title |seats3 |seats4_title |seats4 |seats5_title |seats5 |seats6_title |seats6 |seats7_title |seats7 |seats8_title |seats8 |voting_system1 |voting_system2 |first_election1 |first_election2 |first_election3 |last_election1 |last_election2 |last_election3 |next_election1 |next_election2 |next_election3 |redistricting |motto |session_room=''<nowiki>session_room</nowiki>'' |session_res=''session_res''<br /> |session_alt |meeting_place |session_room2=''<nowiki>session_room2</nowiki>'' |session_res2=''session_res2''<br /> |session_alt2 |meeting_place2 |session_room3=''<nowiki>session_room3</nowiki>'' |session_res3=''session_res3''<br /> |session_alt3 |meeting_place3 |website |constitution |rules |footnotes }} <pre style="overflow:auto;"> {{Infobox legislature | name = | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = | logo_res = | logo_alt = | logo_caption = | house_type = | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = | leader1 = | leader1_term = | party1 = | election1 = | leader2_type = | leader2 = | party2 = | election2 = | leader2_term = | leader3_type = | leader3 = | party3 = | election3 = | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = <!-- or | members = --> | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = | footnotes = }} </pre> {{clear}} === Parameter descriptions === The parameters are: * '''name''' – the name of the Parliament/House (e.g. House of Commons (UK); Parliament of Romania) * '''native_name''' – the name of the Parliament/House in the native language; use {{tl|Plainlist}} for more than one native language (e.g. Parlamentul of României). * '''native_name_lang''' – the language of the native name; use [[List of ISO 639-2 codes|ISO 639-2 code]], e.g. "fr" for French; if there is more than one native name, in different languages, enter those names using {{tl|Lang}}, instead * '''transcription_name''' – the name of the Parliament/House in transliteration from the native language alphabet (if different than Latin alphabet). Use {{Tld|plainlist}} for more than one native language * '''legislature''' – the term of the ongoing session (e.g.: "40th Canadian Parliament"; "10th Legislature (of Las Cortes Generales)") * '''coa_pic''' – image name for coat of arms (Optional) * '''coa_res''' – width in pixels for ''coa_pic'' image (Optional); defaults to 170px (about 75% of thumbnail size 220px but will vary if changed in [[Special:Preferences]]) due to use of ''upright'' in template (see {{section link|Wikipedia:Extended image syntax|Size}}) * '''coa_alt''' – [[WP:ALT|alternative text]] for ''coa_pic'' image * '''coa_caption''' – caption text to be display below ''coa_pic'' image (Optional) * '''logo_pic''' – image name for logo (Optional) * '''logo_res''' – width in pixels for ''logo_pic'' image (Optional); defaults to 170px (about 75% of thumbnail size 220px but will vary if changed in [[Special:Preferences]]) due to use of ''upright'' in template (see {{section link|Wikipedia:Extended image syntax|Size}}) * '''logo_alt''' – [[WP:ALT|alternative text]] for ''logo_pic'' image * '''logo_caption''' – caption text to be displayed below ''logo_pic'' image (Optional) * '''house_type''' – For houses, one of <code>upper house</code>, <code>lower house</code>, or <code>unicameral house</code>; for legislatures as a whole, one of <code>unicameral</code>, <code>bicameral</code>, <code>tricameral</code>, or <code>tetracameral</code>. The template will turn the input into a wikilink * '''body''' – name of large legislative assembly if a chamber * '''jurisdiction''' – * '''houses''' – names of the houses that make up the assembly; if more than one, separate with {{tlx|plainlist}} * '''term_limits''' – * '''foundation''' – date founded; use {{tl|Start date}} * '''disbanded''' – date disbanded; use {{tl|End date}} * '''preceded_by''' – preceding legislature * '''succeeded_by''' – succeeding legislature * '''new_session''' – date of the new session; use {{Tl|Start date}} * '''leader1_type''' – title of a chamber leader (speaker, chairman, president, etc.) * '''leader1''' – leader of the chamber * '''party1''' – political party of leader * '''election1''' – date that leader was elected * '''leader2_type''' – ''[[idem]]'' * '''leader2 ''' – ''idem'' * '''party2''' – ''idem'' * '''election2''' – ''idem'' * '''leader3_type''' – ''idem'' * '''leader3''' – ''idem'' * '''party3''' – ''idem'' * '''election4''' – ''idem'' * '''leader4_type''' – ''idem'' * '''leader4''' – ''idem'' * '''party4''' – ''idem'' * '''election5''' – ''idem'' * '''leader5_type''' – ''idem'' * '''leader5''' – ''idem'' * '''party5''' – ''idem'' * '''election6''' – ''idem'' * '''leader6_type''' – ''idem'' * '''leader6''' – ''idem'' * '''party6''' – ''idem'' * '''election6''' – ''idem'' * '''leader7_type''' – ''idem'' * '''leader7''' – ''idem'' * '''party7''' – ''idem'' * '''election7''' – ''idem'' * '''seats''' – the (total) number of seats in the assembly; if more than one, separate with {{tlx|plainlist}} * '''house1''' – name of the upper/lower house * '''house2''' – name of the lower/upper house * '''structure1''' – image name for diagram of the political structure of ''house1'' (Optional) * '''structure1_res''' – width in pixels for ''structure1'' image (Optional); defaults to 120px due to a setting in template * '''structure1_alt''' – [[WP:ALT|alternative text]] for ''structure1'' image * '''structure2''' – image name for diagram of the political structure of ''house2'' (Optional) * '''structure2_res''' – width in pixels for ''structure2'' image (Optional); defaults to 120px due to a setting in template * '''structure2_alt''' – [[WP:ALT|alternative text]] for ''structure2'' image * '''political_groups1''' – list of the political parties/groups represented in ''house1'' * '''political_groups2''' – list of the political parties/groups represented in ''house2'' * '''committees1''' – list of the committees in ''house1'' * '''committees2''' – list of the committees in ''house2'' * '''joint_committees''' – list of the joint committees * '''term_length''' – * '''authority''' – * '''salary''' – * '''seats1_title''' – * '''seats1''' – * '''seats2_title''' – * '''seats2''' – * '''seats3_title''' – * '''seats3''' – * '''seats4_title''' – * '''seats4''' – * '''seats5_title''' – * '''seats5''' – * '''seats6_title''' – * '''seats6''' – * '''seats7_title''' – * '''seats7''' – * '''seats8_title''' – * '''seats8''' – * '''voting_system1''' – the voting system used for the ''house1'' * '''voting_system2''' – the voting system used for the ''house2'' * '''first_election1''' – the first election date for the ''house1'' * '''first_election2''' – the first election date for the ''house2'' * '''first_election3''' – the first general election date * '''last_election1''' – the last election date for the ''house1'' * '''last_election2''' – the last election date for the ''house2'' * '''last_election3''' – the last general election date * '''next_election1''' – the next election date for ''house1'' * '''next_election2''' – the next election date for ''house2'' * '''next_election3''' – the next general election date * '''redistricting''' – * '''motto''' – Motto * '''session_room''' – image of the session room (Optional) * '''session_res''' – width in pixels for ''session_room'' image (Optional); defaults to 220px (but will vary if thumbnail size is changed in [[Special:Preferences]]) * '''session_alt''' – [[WP:ALT|alternative text]] for ''session_room'' image * '''meeting_place''' – place where it meets: room, building, or city (e.g. Palatul Parlamentului, Bucureşti); displayed as caption below ''session_room'' image * '''session_room2''' – second image of the session room (Optional) * '''session_res2''' – width in pixels for ''session_room2'' image (Optional); defaults to 220px (but will vary if thumbnail size is changed in [[Special:Preferences]]) * '''session_alt2''' – [[WP:ALT|alternative text]] for ''session_room2'' image * '''meeting_place2''' – second place where it meets: room, building, or city; displayed as caption below ''session_room2'' image * '''website''' – the assembly's/house's official website (Optional); use {{tl|URL}} * '''constitution''' – * '''rules''' – * '''footnotes''' – any necessary footnotes (Optional) == Microformat == {{UF-hcard-org}} == TemplateData == {{TemplateData header}} <templatedata> { "params": { "background_color": {}, "name": {}, "native_name": {}, "native_name_lang": {}, "transcription_name": {}, "legislature": {}, "coa_pic": {}, "coa_res": {}, "coa_alt": {}, "coa_caption": {}, "logo": {}, "logo_pic": {}, "logo_res": {}, "logo_alt": {}, "logo_caption": {}, "labelstyle": {}, "house_type": {}, "houses": {}, "term_limits": {}, "body": {}, "jurisdiction": {}, "chambers": {}, "foundation": {}, "disbanded": {}, "preceded_by": {}, "succeeded_by": {}, "new_session": {}, "established": {}, "leader1": {}, "leader2": {}, "leader3": {}, "leader4": {}, "leader5": {}, "leader6": {}, "leader7": {}, "leader8": {}, "leader1_type": {}, "party1": {}, "election1": {}, "leader1_term": {}, "leader2_type": {}, "party2": {}, "election2": {}, "leader2_term": {}, "leader3_type": {}, "party3": {}, "election3": {}, "leader3_term": {}, "leader4_type": {}, "party4": {}, "election4": {}, "leader4_term": {}, "leader5_type": {}, "party5": {}, "election5": {}, "leader5_term": {}, "leader6_type": {}, "party6": {}, "election6": {}, "leader6_term": {}, "leader7_type": {}, "party7": {}, "election7": {}, "leader7_term": {}, "leader8_type": {}, "party8": {}, "election8": {}, "leader8_term": {}, "leader9_type": {}, "leader9": {}, "party9": {}, "election9": {}, "leader9_term": {}, "leader10_type": {}, "leader10": {}, "party10": {}, "election10": {}, "leader10_term": {}, "structure1": {}, "political_groups1": {}, "structure3": {}, "political_groups3": {}, "committees1": {}, "committees2": {}, "joint_committees": {}, "term_length": {}, "authority": {}, "salary": {}, "seats1": {}, "seats2": {}, "seats3": {}, "seats4": {}, "seats5": {}, "seats6": {}, "seats7": {}, "seats8": {}, "members": {}, "seats": {}, "structure1_res": {}, "structure1_alt": {}, "house1": {}, "structure2": {}, "structure2_res": {}, "structure2_alt": {}, "house2": {}, "political_groups2": {}, "seats1_title": {}, "seats2_title": {}, "seats3_title": {}, "seats4_title": {}, "seats5_title": {}, "seats6_title": {}, "seats7_title": {}, "seats8_title": {}, "seats9_title": {}, "seats9": {}, "seats10_title": {}, "seats10": {}, "voting_system1": {}, "voting_system2": {}, "first_election1": {}, "first_election2": {}, "first_election3": {}, "last_election1": {}, "last_election2": {}, "last_election3": {}, "next_election1": {}, "next_election2": {}, "next_election3": {}, "redistricting": {}, "motto": {}, "session_room": {}, "meeting_place": {}, "session_res": {}, "session_alt": {}, "session_room2": {}, "session_res2": {}, "session_alt2": {}, "meeting_place2": {}, "session_room3": {}, "session_res3": {}, "session_alt3": {}, "meeting_place3": {}, "website": {}, "constitution": {}, "rules": {}, "footnotes": {}, "text_color": {} }, "description": "infobox for legislatures" } </templatedata> ==Tracking category== * {{clc|Infobox legislature with background color}} {{Organization infoboxes}} <includeonly>{{Sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> [[Category:Politics and government infobox templates|Legislature]] }}</includeonly> 98ceef7ef705bd726cfa96490e94a2ffdd1240dc Template:Longitem 10 84 221 220 2022-08-01T10:56:24Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#if:{{{1|}}}|<div style="}} display:inline-block; line-height:1.2em; padding:0.1em 0;{{#if:{{{1|}}}|{{{style|}}}">{{{1}}}</div><includeonly>{{#if:{{{2|}}}|[[Category:Pages using Template:Longitem with unnamed style parameter]]}}</includeonly>}}<noinclude> {{documentation}} </noinclude> 6a40580511715660899f98b06460a45f5a42977b Template:Microformat message 10 85 223 222 2022-08-01T10:56:25Z 17ademoladav 2 1 revision imported wikitext text/x-wiki The [[Help:HTML in wikitext|HTML mark-up]] produced by this template includes {{#if:{{{type|}}} |{{{type}}} |an [[{{{format}}} microformat]]}} that makes {{{data}}} readily [[Parsing|parsable]] by computer programs. This aids tasks such as the cataloguing of articles and maintenance of databases. For more information about the use of microformats on Wikipedia, please visit [[Wikipedia:WikiProject Microformats|the Microformat WikiProject]].<!-- -->{{#if:{{{subtemplates<includeonly>|</includeonly>}}} | <div style="margin-top:0.5em;margin-bottom:0.65em;"> ; {{big|Subtemplates}} {{{subtemplates}}} '''''Please do not remove instances of these subtemplates.''''' </div>}}<!-- -->{{#if:{{{subsection1|}}} | <div style="margin-top:0.5em;margin-bottom:0.65em;"><!--(newline in case subsection begins with heading:)--> {{{subsection1}}} </div>}}<!-- -->{{#if:{{{1<includeonly>|</includeonly>}}} <!--(i.e. if at least one unnamed parameter supplied:)--> | <div style="margin-top:0.5em;margin-bottom:0.65em;"> ; {{big|Classes used}} The [[HTML attribute|HTML class]]es of this microformat include: : {{hlist |item_style=font-size:110%;{{{itemstyle|}}} |{{{1}}} |{{{2<includeonly>|</includeonly>}}} |{{{3|<noinclude>{{nobold|……}}</noinclude>}}} |{{{4|}}} |{{{5|}}} |{{{6|}}} |{{{7|}}} |{{{8|}}} |{{{9|}}} |{{{10|}}} |{{{11|}}} |{{{12|}}} |{{{13|}}} |{{{14|}}} |{{{15|}}} |{{{16|}}} |{{{17|}}} |{{{18|}}} |{{{19|}}} |{{{20|}}} }} </div> {{longitem|style=line-height:1.3em|'''''Please do not rename or remove these classes{{#if:{{{nocollapse<includeonly>|</includeonly>}}} |<br/>nor collapse nested elements which use them}}.'''''}}<!-- -->}}<!--(end #if:[1])--><noinclude> {{Documentation}} </noinclude> bfb8605b8917ea8a940634ca79c9c1a4c9c50ef0 Template:Navbox 10 86 225 224 2022-08-01T10:56:26Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:Navbox|navbox}}</includeonly><noinclude> {{Documentation}} </noinclude> fe9b964401f895918ee4fe078678f1722a3c41ec Template:Organization infoboxes 10 87 227 226 2022-08-01T10:56:27Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{Navbox | name = Organization infoboxes | state = {{{state<includeonly>|expanded</includeonly>}}} | bodyclass = hlist | title = [[Wikipedia:Template index|Wikipedia templates]]: [[organization]] [[Template:Infobox|infoboxes]] | above = [[Wikipedia:Manual of Style/Infoboxes]] | group1 = General | list1 = * {{Tl|Infobox organization}} * {{Tl|Infobox official post}} * {{tl|Infobox criminal organization}} * {{tl|Infobox fictional organisation}} | group2 = {{longitem|Government<br/>and politics}} | list2 = * {{Tl|Infobox government}} * {{Tl|Infobox government agency}} * {{Tl|Infobox legislature}} * {{Tl|Infobox political party}} * {{Tl|Infobox court}} * {{Tl|Infobox detention facility}} * {{tl|Infobox fire department}} * {{Tl|Infobox law enforcement agency}} * {{Tl|Infobox space agency}} | group3 = Military | list3 = * {{Tl|Infobox national military}} * {{Tl|Infobox military unit}} * {{tl|Infobox military rank}} * {{Tl|Infobox military gear}} | group4 = Religion | list4 = * {{Tl|Infobox religious group}} * {{Tl|Infobox Christian denomination}} * {{Tl|Infobox diocese}} * {{Tl|Infobox church}} * {{Tl|Infobox monastery}} | group5 = People | list5 = * {{Tl|Infobox ethnic group}} * {{Tl|Infobox caste}} * {{Tl|Infobox clan}} * {{Tl|Infobox family}} * {{Tl|Infobox hereditary title}} * {{Tl|Infobox monarchy}} * {{Tl|Infobox officeholder}} * {{Tl|Infobox tribe}} | group6 = {{longitem|Typically<br/>non-profit}} | list6 = * {{tl|Infobox hospital}} * {{Tl|Infobox institute}} * {{Tl|Infobox laboratory}}{{smallsup|1}} * {{tl|Infobox museum}} * {{Tl|Infobox observatory}} * {{Tl|Infobox school}} * {{tl|Infobox school district}} * {{Tl|Infobox university}}{{smallsup|2}} | group7 = Publications | list7 = * {{Tl|Infobox journal}} * {{Tl|Infobox magazine}} * {{Tl|Infobox newspaper}} * {{Tl|Infobox publisher}} | group8 = Business | list8 = * {{Tl|Infobox company}} * {{tl|Infobox brewery}} * {{Tl|Infobox law firm}} * {{tl|Infobox restaurant}} * {{tl|Infobox website}} – ''type of business or publication'' | group9 = Distinctions | list9 = * {{Tl|Infobox order}} * {{Tl|Infobox fraternity}} * {{Tl|Infobox Grand Lodge}} | group10 = Subtemplates | list10 = * '''Coordinates'''&nbsp;{{Tl|coord}} * '''Dates''' ** {{Tl|start date}}}—for {{para|established}}, {{para|founded}}, {{para|opened}} etc. ** {{Tl|end date}}}—for {{para|dissolved}}, {{para|defunct}} * '''Lists''' **{{tl|plainlist}} ** {{tl|flatlist}} ** {{tl|unbulleted list}} * '''Non-English text'''&nbsp;{{Tl|lang}} * '''Website''' ** {{tl|URL}} ** {{tl|Official URL}} ** {{tl|Official website}} * '''Documentation''' ** &nbsp;{{Tl|mf-adr}}}—Address ** &nbsp;{{Tl|UF-hcard-org}}—[[Microformat]]/metadata | below = * {{smallsup|1}} or research institution * {{smallsup|2}} or college * [[:Category:Infobox templates|Category]] * [[Help:Infobox|Help]] * [[Wikipedia:List of infoboxes|List of infoboxes]] }}<noinclude>{{documentation}}</noinclude> 8686e107237649b39aaa1a793a50b8fdddb17421 Template:Section link 10 88 231 230 2022-08-01T10:56:31Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#invoke:Section link|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 8d047e5845f8a9b74a4655b5dd79ca7595a8f88b Template:Smallsup 10 89 233 232 2022-08-01T10:56:32Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly><sup><small>{{{1}}}</small></sup></includeonly><noinclude> {{Documentation}} </noinclude> c174fb3247218273210500118556feb9f3c76d5a Template:Str index 10 90 235 234 2022-08-01T10:56:32Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly>{{{{{|safesubst:}}}#Invoke:String | pos | target={{{1|}}} | pos={{{2|0}}} | no_category={{{nocategory|}}} }}</includeonly><noinclude> {{documentation}} </noinclude> 2df88ba968cdbbcf14c1d54065af3b961aa803a0 Template:Template link code 10 91 237 236 2022-08-01T10:56:35Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nolink=yes|code=yes|nowrap=yes}}</includeonly><noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlc}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 044f00ca1bfc10cb967c32e893043ccc6f739764 Template:Template link expanded 10 92 239 238 2022-08-01T10:56:35Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#Invoke:Template link general|main|code=on}}<noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlx}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 6c99696fee02f1da368ed20d2504e19bc15b1c13 Template:Tld 10 93 241 240 2022-08-01T10:56:36Z 17ademoladav 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Template link code]] be5d6275ea41d83224503e05901f3405c82141f7 Template:Tlx 10 94 243 242 2022-08-01T10:56:37Z 17ademoladav 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Template link expanded]] {{Redirect category shell| {{R from move}} }} 1fec988ceb46cb324af228aac45d7cd25fcc9008 Template:UF-hcard-org 10 95 245 244 2022-08-01T10:56:38Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{Microformat message | format = hCard | data = an organization's details | subtemplates = * Use {{#ifeq:{{yesno-yes|{{{age|}}}}}|yes|{{tl|Start date and age}}|{{tl|Start date}}}} for the date on which an organisation was "established", "founded", "opened" or otherwise started, [[Wikipedia:WikiProject Microformats/dates|unless that date is before 1583&nbsp;CE]]. * Use {{tl|URL}} for an organisation's URL. |adr |agent |category |country-name |extended-address |fn |geo |label |latitude |locality |longitude |nickname |note |org |region |street-address |url |vcard | nocollapse = on }}<includeonly>{{sandbox other|| [[Category:Templates generating hCards]] }}</includeonly><noinclude> {{Documentation |content={{Microformat message templates}}}} [[Category:Microformat (uF) message templates]] [[Category:Templates generating hCards| ]] </noinclude> 631bc99cd046167681b6eb518559d92fc65a4920 Template:Yesno-yes 10 96 247 246 2022-08-01T10:56:39Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{SAFESUBST:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|yes}}}|¬={{{¬|yes}}}|def={{{def|yes}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 1644b79058ef2cece539a411edc164d98bb11ebe Module:Color contrast 828 97 249 248 2022-08-01T10:56:39Z 17ademoladav 2 1 revision imported Scribunto text/plain -- -- This module implements -- {{Color contrast ratio}} -- {{Greater color contrast ratio}} -- {{ColorToLum}} -- {{RGBColorToLum}} -- local p = {} local HTMLcolor = mw.loadData( 'Module:Color contrast/colors' ) local function sRGB (v) if (v <= 0.03928) then v = v / 12.92 else v = math.pow((v+0.055)/1.055, 2.4) end return v end local function rgbdec2lum(R, G, B) if ( 0 <= R and R < 256 and 0 <= G and G < 256 and 0 <= B and B < 256 ) then return 0.2126 * sRGB(R/255) + 0.7152 * sRGB(G/255) + 0.0722 * sRGB(B/255) else return '' end end local function hsl2lum(h, s, l) if ( 0 <= h and h < 360 and 0 <= s and s <= 1 and 0 <= l and l <= 1 ) then local c = (1 - math.abs(2*l - 1))*s local x = c*(1 - math.abs( math.fmod(h/60, 2) - 1) ) local m = l - c/2 local r, g, b = m, m, m if( 0 <= h and h < 60 ) then r = r + c g = g + x elseif( 60 <= h and h < 120 ) then r = r + x g = g + c elseif( 120 <= h and h < 180 ) then g = g + c b = b + x elseif( 180 <= h and h < 240 ) then g = g + x b = b + c elseif( 240 <= h and h < 300 ) then r = r + x b = b + c elseif( 300 <= h and h < 360 ) then r = r + c b = b + x end return rgbdec2lum(255*r, 255*g, 255*b) else return '' end end local function color2lum(c) if (c == nil) then return '' end -- html '#' entity c = c:gsub("&#35;", "#") -- whitespace c = c:match( '^%s*(.-)[%s;]*$' ) -- unstrip nowiki strip markers c = mw.text.unstripNoWiki(c) -- lowercase c = c:lower() -- first try to look it up local L = HTMLcolor[c] if (L ~= nil) then return L end -- convert from hsl if mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9%.]*[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local h, s, l = mw.ustring.match(c,'^hsl%([%s]*([0-9][0-9%.]*)[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return hsl2lum(tonumber(h), tonumber(s)/100, tonumber(l)/100) end -- convert from rgb if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*%)$') return rgbdec2lum(tonumber(R), tonumber(G), tonumber(B)) end -- convert from rgb percent if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return rgbdec2lum(255*tonumber(R)/100, 255*tonumber(G)/100, 255*tonumber(B)/100) end -- remove leading # (if there is one) and whitespace c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s]*$') -- split into rgb local cs = mw.text.split(c or '', '') if( #cs == 6 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2]) local G = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[4]) local B = 16*tonumber('0x' .. cs[5]) + tonumber('0x' .. cs[6]) return rgbdec2lum(R, G, B) elseif ( #cs == 3 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[1]) local G = 16*tonumber('0x' .. cs[2]) + tonumber('0x' .. cs[2]) local B = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[3]) return rgbdec2lum(R, G, B) end -- failure, return blank return '' end -- This exports the function for use in other modules. -- The colour is passed as a string. function p._lum(color) return color2lum(color) end function p._greatercontrast(args) local bias = tonumber(args['bias'] or '0') or 0 local css = (args['css'] and args['css'] ~= '') and true or false local v1 = color2lum(args[1] or '') local c2 = args[2] or '#FFFFFF' local v2 = color2lum(c2) local c3 = args[3] or '#000000' local v3 = color2lum(c3) local ratio1 = -1; local ratio2 = -1; if (type(v1) == 'number' and type(v2) == 'number') then ratio1 = (v2 + 0.05)/(v1 + 0.05) ratio1 = (ratio1 < 1) and 1/ratio1 or ratio1 end if (type(v1) == 'number' and type(v3) == 'number') then ratio2 = (v3 + 0.05)/(v1 + 0.05) ratio2 = (ratio2 < 1) and 1/ratio2 or ratio2 end if css then local c1 = args[1] or '' if mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c1 = '#' .. c1 end if mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c2 = '#' .. c2 end if mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c3 = '#' .. c3 end return 'background-color:' .. c1 .. '; color:' .. ((ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '') .. ';' end return (ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '' end function p._ratio(args) local v1 = color2lum(args[1]) local v2 = color2lum(args[2]) if (type(v1) == 'number' and type(v2) == 'number') then -- v1 should be the brighter of the two. if v2 > v1 then v1, v2 = v2, v1 end return (v1 + 0.05)/(v2 + 0.05) else return args['error'] or '?' end end function p._styleratio(args) local style = (args[1] or ''):lower() local bg, fg = 'white', 'black' local lum_bg, lum_fg = 1, 0 if args[2] then local lum = color2lum(args[2]) if lum ~= '' then bg, lum_bg = args[2], lum end end if args[3] then local lum = color2lum(args[3]) if lum ~= '' then fg, lum_fg = args[3], lum end end local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&#[Xx]23;', '#'), '&#35;', '#'), ';') for k = 1,#slist do local s = slist[k] local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' ) k = k or '' v = v or '' if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background%-color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_bg = v, lum end elseif (k:match('^[%s]*(color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_fg = v, lum end end end if lum_bg > lum_fg then return (lum_bg + 0.05)/(lum_fg + 0.05) else return (lum_fg + 0.05)/(lum_bg + 0.05) end end --[[ Use {{#invoke:Color contrast|somecolor}} directly or {{#invoke:Color contrast}} from a wrapper template. Parameters: -- |1= — required; A color to check. --]] function p.lum(frame) local color = frame.args[1] or frame:getParent().args[1] return p._lum(color) end function p.ratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._ratio(args) end function p.styleratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._styleratio(args) end function p.greatercontrast(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._greatercontrast(args) end return p 1e399769117591366a63f62996c9a407077cc711 Module:Color contrast/colors 828 98 251 250 2022-08-01T10:56:40Z 17ademoladav 2 1 revision imported Scribunto text/plain return { aliceblue = 0.92880068253475, antiquewhite = 0.84646951707754, aqua = 0.7874, aquamarine = 0.8078549208338, azure = 0.97265264954166, beige = 0.8988459998705, bisque = 0.80732327372979, black = 0, blanchedalmond = 0.85084439608156, blue = 0.0722, blueviolet = 0.12622014321946, brown = 0.098224287876511, burlywood = 0.51559844533893, cadetblue = 0.29424681085422, chartreuse = 0.76032025902623, chocolate = 0.23898526114557, coral = 0.37017930872924, cornflowerblue = 0.30318641994179, cornsilk = 0.93562110372965, crimson = 0.16042199953026, cyan = 0.7874, darkblue = 0.018640801980939, darkcyan = 0.20329317839046, darkgoldenrod = 0.27264703559993, darkgray = 0.39675523072563, darkgreen = 0.091143429047575, darkgrey = 0.39675523072563, darkkhaki = 0.45747326349994, darkmagenta = 0.07353047651207, darkolivegreen = 0.12651920884889, darkorange = 0.40016167026524, darkorchid = 0.13413142174857, darkred = 0.054889674531132, darksalmon = 0.40541471563381, darkseagreen = 0.43789249325969, darkslateblue = 0.065792846227988, darkslategray = 0.067608151928044, darkslategrey = 0.067608151928044, darkturquoise = 0.4874606277449, darkviolet = 0.10999048339343, deeppink = 0.23866895828276, deepskyblue = 0.44481603395575, dimgray = 0.14126329114027, dimgrey = 0.14126329114027, dodgerblue = 0.27442536991456, firebrick = 0.10724525535015, floralwhite = 0.95922484825004, forestgreen = 0.18920812076002, fuchsia = 0.2848, gainsboro = 0.71569350050648, ghostwhite = 0.94311261886323, gold = 0.69860877428159, goldenrod = 0.41919977809569, gray = 0.2158605001139, green = 0.15438342968146, greenyellow = 0.80609472611453, grey = 0.2158605001139, honeydew = 0.96336535554782, hotpink = 0.34658438169715, indianred = 0.21406134963884, indigo = 0.03107561486337, ivory = 0.99071270600615, khaki = 0.77012343394121, lavender = 0.80318750514521, lavenderblush = 0.90172748631046, lawngreen = 0.73905893124963, lemonchiffon = 0.94038992245622, lightblue = 0.63709141280807, lightcoral = 0.35522120733135, lightcyan = 0.94587293494829, lightgoldenrodyellow = 0.93348351018297, lightgray = 0.65140563741982, lightgreen = 0.69091979956865, lightgrey = 0.65140563741982, lightpink = 0.58566152734898, lightsalmon = 0.4780675225206, lightseagreen = 0.35050145117042, lightskyblue = 0.56195637618331, lightslategray = 0.23830165007287, lightslategrey = 0.23830165007287, lightsteelblue = 0.53983888284666, lightyellow = 0.98161818392882, lime = 0.7152, limegreen = 0.44571042246098, linen = 0.88357340984379, magenta = 0.2848, maroon = 0.045891942324215, mediumaquamarine = 0.49389703310801, mediumblue = 0.044077780212328, mediumorchid = 0.21639251153773, mediumpurple = 0.22905858091648, mediumseagreen = 0.34393112338131, mediumslateblue = 0.20284629471622, mediumspringgreen = 0.70704308194184, mediumturquoise = 0.5133827926448, mediumvioletred = 0.14371899849357, midnightblue = 0.02071786635086, mintcream = 0.97834604947588, mistyrose = 0.82183047859185, moccasin = 0.80083000991567, navajowhite = 0.76519682342785, navy = 0.015585128108224, oldlace = 0.91900633405549, olive = 0.20027537200568, olivedrab = 0.22593150951929, orange = 0.4817026703631, orangered = 0.25516243753416, orchid = 0.31348806761439, palegoldenrod = 0.78792647887614, palegreen = 0.77936759006353, paleturquoise = 0.76436077921714, palevioletred = 0.28754994117889, papayawhip = 0.87797100199835, peachpuff = 0.74905589878251, peru = 0.30113074877936, pink = 0.63271070702466, plum = 0.45734221587969, powderblue = 0.68254586500605, purple = 0.061477070432439, rebeccapurple = 0.07492341159447, red = 0.2126, rosybrown = 0.32319457649407, royalblue = 0.16663210743188, saddlebrown = 0.097922285020521, salmon = 0.36977241527596, sandybrown = 0.46628543696283, seagreen = 0.19734199706275, seashell = 0.92737862206922, sienna = 0.13697631337098, silver = 0.52711512570581, skyblue = 0.55291668518184, slateblue = 0.14784278062136, slategray = 0.20896704076536, slategrey = 0.20896704076536, snow = 0.96533341834849, springgreen = 0.73052306068529, steelblue = 0.20562642207625, tan = 0.48237604163921, teal = 0.16996855778968, thistle = 0.56818401093733, tomato = 0.30638612719415, turquoise = 0.5895536427578, violet = 0.40315452986676, wheat = 0.74909702820482, white = 1, whitesmoke = 0.91309865179342, yellow = 0.9278, yellowgreen = 0.50762957208707, } 6ae47fdb24de4eed5ec26d203faf5341a388987b Module:Message box/ombox.css 828 99 253 252 2022-08-01T10:56:43Z 17ademoladav 2 1 revision imported text text/plain /* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ombox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } 8fe3df4bb607e699eab2dbd23bd4a1a446391002 Module:Navbar 828 75 255 186 2022-08-01T10:56:43Z 17ademoladav 2 1 revision imported Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p ab8d0f06762f63ada7b225c4e1ab2a7037562880 Module:Navbar/configuration 828 76 257 188 2022-08-01T10:56:43Z 17ademoladav 2 1 revision imported Scribunto text/plain local configuration = { ['templatestyles'] = 'Module:Navbar/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['this_box'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } return configuration 7f1b6300bc4a690ecfb1c83b582f36c603bd1dff Module:Navbar/styles.css 828 100 259 258 2022-08-01T10:56:44Z 17ademoladav 2 1 revision imported text text/plain /* {{pp|small=yes}} */ .navbar { display: inline; font-size: 88%; font-weight: normal; } .navbar-collapse { float: left; text-align: left; } .navbar-boxtext { word-spacing: 0; } .navbar ul { display: inline-block; white-space: nowrap; line-height: inherit; } .navbar-brackets::before { margin-right: -0.125em; content: '[ '; } .navbar-brackets::after { margin-left: -0.125em; content: ' ]'; } .navbar li { word-spacing: -0.125em; } .navbar a > span, .navbar a > abbr { text-decoration: inherit; } .navbar-mini abbr { font-variant: small-caps; border-bottom: none; text-decoration: none; cursor: inherit; } .navbar-ct-full { font-size: 114%; margin: 0 7em; } .navbar-ct-mini { font-size: 114%; margin: 0 4em; } 9d4056f949b4f0b159e3d40dfb1a5f01e72f9571 Module:Navbox 828 101 261 260 2022-08-01T10:56:44Z 17ademoladav 2 1 revision imported Scribunto text/plain local p = {} local navbar = require('Module:Navbar')._navbar local cfg = mw.loadData('Module:Navbox/configuration') local getArgs -- lazily initialized local args local format = string.format local function striped(wikitext, border) -- Return wikitext with markers replaced for odd/even striping. -- Child (subgroup) navboxes are flagged with a category that is removed -- by parent navboxes. The result is that the category shows all pages -- where a child navbox is not contained in a parent navbox. local orphanCat = cfg.category.orphan if border == cfg.keyword.border_subgroup and args[cfg.arg.orphan] ~= cfg.keyword.orphan_yes then -- No change; striping occurs in outermost navbox. return wikitext .. orphanCat end local first, second = cfg.class.navbox_odd_part, cfg.class.navbox_even_part if args[cfg.arg.evenodd] then if args[cfg.arg.evenodd] == cfg.keyword.evenodd_swap then first, second = second, first else first = args[cfg.arg.evenodd] second = first end end local changer if first == second then changer = first else local index = 0 changer = function (code) if code == '0' then -- Current occurrence is for a group before a nested table. -- Set it to first as a valid although pointless class. -- The next occurrence will be the first row after a title -- in a subgroup and will also be first. index = 0 return first end index = index + 1 return index % 2 == 1 and first or second end end local regex = orphanCat:gsub('([%[%]])', '%%%1') return (wikitext:gsub(regex, ''):gsub(cfg.marker.regex, changer)) -- () omits gsub count end local function processItem(item, nowrapitems) if item:sub(1, 2) == '{|' then -- Applying nowrap to lines in a table does not make sense. -- Add newlines to compensate for trim of x in |parm=x in a template. return '\n' .. item ..'\n' end if nowrapitems == cfg.keyword.nowrapitems_yes then local lines = {} for line in (item .. '\n'):gmatch('([^\n]*)\n') do local prefix, content = line:match('^([*:;#]+)%s*(.*)') if prefix and not content:match(cfg.pattern.nowrap) then line = format(cfg.nowrap_item, prefix, content) end table.insert(lines, line) end item = table.concat(lines, '\n') end if item:match('^[*:;#]') then return '\n' .. item ..'\n' end return item end -- we will want this later when we want to add tstyles for hlist/plainlist local function has_navbar() return args[cfg.arg.navbar] ~= cfg.keyword.navbar_off and args[cfg.arg.navbar] ~= cfg.keyword.navbar_plain and ( args[cfg.arg.name] or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.pattern.sandbox, '') ~= cfg.pattern.navbox ) end local function renderNavBar(titleCell) if has_navbar() then titleCell:wikitext(navbar{ [cfg.navbar.name] = args[cfg.arg.name], [cfg.navbar.mini] = 1, [cfg.navbar.fontstyle] = (args[cfg.arg.basestyle] or '') .. ';' .. (args[cfg.arg.titlestyle] or '') .. ';background:none transparent;border:none;box-shadow:none;padding:0;' }) end end local function renderTitleRow(tbl) if not args[cfg.arg.title] then return end local titleRow = tbl:tag('tr') local titleCell = titleRow:tag('th'):attr('scope', 'col') local titleColspan = 2 if args[cfg.arg.imageleft] then titleColspan = titleColspan + 1 end if args[cfg.arg.image] then titleColspan = titleColspan + 1 end titleCell :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.titlestyle]) :addClass(cfg.class.navbox_title) :attr('colspan', titleColspan) renderNavBar(titleCell) titleCell :tag('div') -- id for aria-labelledby attribute :attr('id', mw.uri.anchorEncode(args[cfg.arg.title])) :addClass(args[cfg.arg.titleclass]) :css('font-size', '114%') :css('margin', '0 4em') :wikitext(processItem(args[cfg.arg.title])) end local function getAboveBelowColspan() local ret = 2 if args[cfg.arg.imageleft] then ret = ret + 1 end if args[cfg.arg.image] then ret = ret + 1 end return ret end local function renderAboveRow(tbl) if not args[cfg.arg.above] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.aboveclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.abovestyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') -- id for aria-labelledby attribute, if no title :attr('id', args[cfg.arg.title] and nil or mw.uri.anchorEncode(args[cfg.arg.above])) :wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems])) end local function renderBelowRow(tbl) if not args[cfg.arg.below] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.belowclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.belowstyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') :wikitext(processItem(args[cfg.arg.below], args[cfg.arg.nowrapitems])) end local function renderListRow(tbl, index, listnum, listnums_size) local row = tbl:tag('tr') if index == 1 and args[cfg.arg.imageleft] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 2px 0 0') :cssText(args[cfg.arg.imageleftstyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.imageleft])) end local group_and_num = format(cfg.arg.group_and_num, listnum) local groupstyle_and_num = format(cfg.arg.groupstyle_and_num, listnum) if args[group_and_num] then local groupCell = row:tag('th') -- id for aria-labelledby attribute, if lone group with no title or above if listnum == 1 and not (args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group2]) then groupCell :attr('id', mw.uri.anchorEncode(args[cfg.arg.group1])) end groupCell :attr('scope', 'row') :addClass(cfg.class.navbox_group) :addClass(args[cfg.arg.groupclass]) :cssText(args[cfg.arg.basestyle]) -- If groupwidth not specified, minimize width :css('width', args[cfg.arg.groupwidth] or '1%') groupCell :cssText(args[cfg.arg.groupstyle]) :cssText(args[groupstyle_and_num]) :wikitext(args[group_and_num]) end local listCell = row:tag('td') if args[group_and_num] then listCell :addClass(cfg.class.navbox_list_with_group) else listCell:attr('colspan', 2) end if not args[cfg.arg.groupwidth] then listCell:css('width', '100%') end local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing if index % 2 == 1 then rowstyle = args[cfg.arg.oddstyle] else rowstyle = args[cfg.arg.evenstyle] end local list_and_num = format(cfg.arg.list_and_num, listnum) local listText = args[list_and_num] local oddEven = cfg.marker.oddeven if listText:sub(1, 12) == '</div><table' then -- Assume list text is for a subgroup navbox so no automatic striping for this row. oddEven = listText:find(cfg.pattern.navbox_title) and cfg.marker.restart or cfg.class.navbox_odd_part end local liststyle_and_num = format(cfg.arg.liststyle_and_num, listnum) local listclass_and_num = format(cfg.arg.listclass_and_num, listnum) listCell :css('padding', '0') :cssText(args[cfg.arg.liststyle]) :cssText(rowstyle) :cssText(args[liststyle_and_num]) :addClass(cfg.class.navbox_list) :addClass(cfg.class.navbox_part .. oddEven) :addClass(args[cfg.arg.listclass]) :addClass(args[listclass_and_num]) :tag('div') :css('padding', (index == 1 and args[cfg.arg.list1padding]) or args[cfg.arg.listpadding] or '0 0.25em' ) :wikitext(processItem(listText, args[cfg.arg.nowrapitems])) if index == 1 and args[cfg.arg.image] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 0 0 2px') :cssText(args[cfg.arg.imagestyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.image])) end end -- uses this now to make the needHlistCategory correct -- to use later for when we add list styles via navbox local function has_list_class(htmlclass) local class_args = { -- rough order of probability of use cfg.arg.bodyclass, cfg.arg.listclass, cfg.arg.aboveclass, cfg.arg.belowclass, cfg.arg.titleclass, cfg.arg.navboxclass, cfg.arg.groupclass, cfg.arg.imageclass } local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for _, arg in ipairs(class_args) do for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end return false end local function needsHorizontalLists(border) if border == cfg.keyword.border_subgroup or args[cfg.arg.tracking] == cfg.keyword.tracking_no then return false end return not has_list_class(cfg.pattern.hlist) and not has_list_class(cfg.pattern.plainlist) end local function hasBackgroundColors() for _, key in ipairs({cfg.arg.titlestyle, cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('background', 1, true) then return true end end return false end local function hasBorders() for _, key in ipairs({cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('border', 1, true) then return true end end return false end local function isIllegible() local styleratio = require('Module:Color contrast')._styleratio for key, style in pairs(args) do if tostring(key):match(cfg.pattern.style) then if styleratio{mw.text.unstripNoWiki(style)} < 4.5 then return true end end end return false end local function getTrackingCategories(border) local cats = {} if needsHorizontalLists(border) then table.insert(cats, cfg.category.horizontal_lists) end if hasBackgroundColors() then table.insert(cats, cfg.category.background_colors) end if isIllegible() then table.insert(cats, cfg.category.illegible) end if hasBorders() then table.insert(cats, cfg.category.borders) end return cats end local function renderTrackingCategories(builder, border) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 then return end -- not in template space local subpage = title.subpageText if subpage == cfg.keyword.subpage_doc or subpage == cfg.keyword.subpage_sandbox or subpage == cfg.keyword.subpage_testcases then return end for _, cat in ipairs(getTrackingCategories(border)) do builder:wikitext('[[Category:' .. cat .. ']]') end end local function renderMainTable(border, listnums) local tbl = mw.html.create('table') :addClass(cfg.class.nowraplinks) :addClass(args[cfg.arg.bodyclass]) local state = args[cfg.arg.state] if args[cfg.arg.title] and state ~= cfg.keyword.state_plain and state ~= cfg.keyword.state_off then if state == cfg.keyword.state_collapsed then state = cfg.class.collapsed end tbl :addClass(cfg.class.collapsible) :addClass(state or cfg.class.autocollapse) end tbl:css('border-spacing', 0) if border == cfg.keyword.border_subgroup or border == cfg.keyword.border_none then tbl :addClass(cfg.class.navbox_subgroup) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) else -- regular navbox - bodystyle and style will be applied to the wrapper table tbl :addClass(cfg.class.navbox_inner) :css('background', 'transparent') :css('color', 'inherit') end tbl:cssText(args[cfg.arg.innerstyle]) renderTitleRow(tbl) renderAboveRow(tbl) local listnums_size = #listnums for i, listnum in ipairs(listnums) do renderListRow(tbl, i, listnum, listnums_size) end renderBelowRow(tbl) return tbl end local function add_navbox_styles() local frame = mw.getCurrentFrame() -- This is a lambda so that it doesn't need the frame as a parameter local function add_user_styles(templatestyles) if templatestyles and templatestyles ~= '' then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } end return '' end -- get templatestyles. load base from config so that Lua only needs to do -- the work once of parser tag expansion local base_templatestyles = cfg.templatestyles local templatestyles = add_user_styles(args[cfg.arg.templatestyles]) local child_templatestyles = add_user_styles(args[cfg.arg.child_templatestyles]) -- The 'navbox-styles' div exists for two reasons: -- 1. To wrap the styles to work around T200206 more elegantly. Instead -- of combinatorial rules, this ends up being linear number of CSS rules. -- 2. To allow MobileFrontend to rip the styles out with 'nomobile' such that -- they are not dumped into the mobile view. return mw.html.create('div') :addClass(cfg.class.navbox_styles) :addClass(cfg.class.nomobile) :wikitext(base_templatestyles .. templatestyles .. child_templatestyles) :done() end function p._navbox(navboxArgs) args = navboxArgs local listnums = {} for k, _ in pairs(args) do if type(k) == 'string' then local listnum = k:match(cfg.pattern.listnum) if listnum then table.insert(listnums, tonumber(listnum)) end end end table.sort(listnums) local border = mw.text.trim(args[cfg.arg.border] or args[1] or '') if border == cfg.keyword.border_child then border = cfg.keyword.border_subgroup end -- render the main body of the navbox local tbl = renderMainTable(border, listnums) local res = mw.html.create() -- render the appropriate wrapper for the navbox, based on the border param if border == cfg.keyword.border_none then res:node(add_navbox_styles()) local nav = res:tag('div') :attr('role', 'navigation') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode( args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1] ) ) else nav:attr('aria-label', cfg.aria_label) end elseif border == cfg.keyword.border_subgroup then -- We assume that this navbox is being rendered in a list cell of a -- parent navbox, and is therefore inside a div with padding:0em 0.25em. -- We start with a </div> to avoid the padding being applied, and at the -- end add a <div> to balance out the parent's </div> res :wikitext('</div>') :node(tbl) :wikitext('<div>') else res:node(add_navbox_styles()) local nav = res:tag('div') :attr('role', 'navigation') :addClass(cfg.class.navbox) :addClass(args[cfg.arg.navboxclass]) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) :css('padding', '3px') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode(args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1]) ) else nav:attr('aria-label', cfg.aria_label) end end if (args[cfg.arg.nocat] or cfg.keyword.nocat_false):lower() == cfg.keyword.nocat_false then renderTrackingCategories(res, border) end return striped(tostring(res), border) end function p.navbox(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end args = getArgs(frame, {wrappers = {cfg.pattern.navbox}}) -- Read the arguments in the order they'll be output in, to make references -- number in the right order. local _ _ = args[cfg.arg.title] _ = args[cfg.arg.above] -- Limit this to 20 as covering 'most' cases (that's a SWAG) and because -- iterator approach won't work here for i = 1, 20 do _ = args[format(cfg.arg.group_and_num, i)] _ = args[format(cfg.arg.list_and_num, i)] end _ = args[cfg.arg.below] return p._navbox(args) end return p 5bbd6589b208bd567b351b855083c132c16a0fb9 Module:Navbox/configuration 828 102 263 262 2022-08-01T10:56:45Z 17ademoladav 2 1 revision imported Scribunto text/plain return { aria_label = 'Navbox', nowrap_item = '%s<span class="nowrap">%s</span>', templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' } }, -- do not localize marker table marker = { oddeven = '\127_ODDEVEN_\127', restart = '\127_ODDEVEN0_\127', regex = '\127_ODDEVEN(%d?)_\127' }, category = { orphan = '[[Category:Navbox orphans]]', horizontal_lists = 'Navigational boxes without horizontal lists', background_colors = 'Navboxes using background colours', illegible = 'Potentially illegible navboxes', borders = 'Navboxes using borders', }, keyword = { border_subgroup = 'subgroup', border_child = 'child', border_none = 'none', evenodd_swap = 'swap', navbar_off = 'off', navbar_plain = 'plain', nocat_false = 'false', nowrapitems_yes = 'yes', orphan_yes = 'yes', state_collapsed = 'collapsed', state_off = 'off', state_plain = 'plain', subpage_doc = 'doc', subpage_sandbox = 'sandbox', subpage_testcases = 'testcases', tracking_no = 'no' }, class = { autocollapse = 'autocollapse', collapsible = 'mw-collapsible', collapsed = 'mw-collapsed', -- Warning navbox = 'navbox', -- WMF currently hides 'navbox' from mobile, -- so you probably shouldn't change the navbox class. navbox_abovebelow = 'navbox-abovebelow', navbox_group = 'navbox-group', navbox_image = 'navbox-image', navbox_inner = 'navbox-inner', navbox_list = 'navbox-list', navbox_list_with_group = 'navbox-list-with-group', navbox_part = 'navbox-', -- do not l10n navbox_styles = 'navbox-styles', navbox_subgroup = 'navbox-subgroup', navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below navbox_odd_part = 'odd', -- do not l10n navbox_even_part = 'even', -- do not l10n nomobile = 'nomobile', nowraplinks = 'nowraplinks', noviewer = 'noviewer' -- used to remove images from MediaViewer }, pattern = { listnum = '^list(%d+)$', sandbox = '/sandbox$', navbox = 'Template:Navbox', nowrap = '^<span class="nowrap">', style = 'style$', navbox_title = '<th[^>]*"navbox%-title"', hlist = 'hlist', plainlist = 'plainlist' }, arg = { above = 'above', aboveclass = 'aboveclass', abovestyle = 'abovestyle', basestyle = 'basestyle', bodyclass = 'bodyclass', bodystyle = 'bodystyle', border = 'border', below = 'below', belowclass = 'belowclass', belowstyle = 'belowstyle', evenodd = 'evenodd', evenstyle = 'evenstyle', group1 = 'group1', group2 = 'group2', group_and_num = 'group%d', groupstyle_and_num = 'group%dstyle', groupclass = 'groupclass', groupstyle = 'groupstyle', groupwidth = 'groupwidth', innerstyle = 'innerstyle', image = 'image', imageclass = 'imageclass', imageleft = 'imageleft', imageleftstyle = 'imageleftstyle', imagesetyle = 'imagestyle', list_and_num = 'list%d', listclass_and_num = 'list%dclass', liststyle_and_num = 'list%dstyle', list1padding = 'list1padding', listclass = 'listclass', listpadding = 'listpadding', liststyle = 'liststyle', name = 'name', navbar = 'navbar', navboxclass = 'navboxclass', nocat = 'nocat', nowrapitems = 'nowrapitems', oddstyle = 'oddstyle', orphan = 'orphan', state = 'state', style = 'style', templatestyles = 'templatestyles', child_templatestyles = 'child templatestyles', title = 'title', titleclass = 'titleclass', titlestyle = 'titlestyle', tracking = 'tracking' }, -- names of navbar arguments navbar = { name = 1, fontstyle = 'fontstyle', mini = 'mini' } } 4a1fb97efbf7aa8a852959457b43eab420073194 Module:Navbox/styles.css 828 103 265 264 2022-08-01T10:56:45Z 17ademoladav 2 1 revision imported text text/plain /* {{pp|small=y}} */ .navbox { box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; clear: both; font-size: 88%; text-align: center; padding: 1px; margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */ } .navbox .navbox { margin-top: 0; /* No top margin for nested navboxes */ } .navbox + .navbox, /* TODO: remove first line after transclusions have updated */ .navbox + .navbox-styles + .navbox { margin-top: -1px; /* Single pixel border between adjacent navboxes */ } .navbox-inner, .navbox-subgroup { width: 100%; } .navbox-group, .navbox-title, .navbox-abovebelow { padding: 0.25em 1em; line-height: 1.5em; text-align: center; } .navbox-group { white-space: nowrap; /* @noflip */ text-align: right; } .navbox, .navbox-subgroup { background-color: #fdfdfd; } .navbox-list { line-height: 1.5em; border-color: #fdfdfd; /* Must match background color */ } .navbox-list-with-group { text-align: left; border-left-width: 2px; border-left-style: solid; } /* cell spacing for navbox cells */ /* Borders above 2nd, 3rd, etc. rows */ /* TODO: figure out how to replace tr as structure; * with div structure it should be just a matter of first-child */ tr + tr > .navbox-abovebelow, tr + tr > .navbox-group, tr + tr > .navbox-image, tr + tr > .navbox-list { border-top: 2px solid #fdfdfd; /* Must match background color */ } .navbox-title { background-color: #ccf; /* Level 1 color */ } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background-color: #ddf; /* Level 2 color */ } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background-color: #e6e6ff; /* Level 3 color */ } .navbox-even { background-color: #f7f7f7; } .navbox-odd { background-color: transparent; } /* TODO: figure out how to remove reliance on td as structure */ .navbox .hlist td dl, .navbox .hlist td ol, .navbox .hlist td ul, .navbox td.hlist dl, .navbox td.hlist ol, .navbox td.hlist ul { padding: 0.125em 0; } .navbox .navbar { display: block; font-size: 100%; } .navbox-title .navbar { /* @noflip */ float: left; /* @noflip */ text-align: left; /* @noflip */ margin-right: 0.5em; } e80b0d7a5770e6e105dab832deb6c37a5245ebc6 Module:Section link 828 104 267 266 2022-08-01T10:56:46Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module implements {{section link}}. require('Module:No globals'); local checkType = require('libraryUtil').checkType local p = {} local function makeSectionLink(page, section, display) display = display or section page = page or '' -- MediaWiki doesn't allow these in `page`, so only need to do for `section` if type(section) == 'string' then section = string.gsub(section, "{", "&#x7B;") section = string.gsub(section, "}", "&#x7D;") end return string.format('[[%s#%s|%s]]', page, section, display) end local function normalizeTitle(title) title = mw.ustring.gsub(mw.ustring.gsub(title, "'", ""), '"', '') title = mw.ustring.gsub(title, "%b<>", "") return mw.title.new(title).prefixedText end function p._main(page, sections, options, title) -- Validate input. checkType('_main', 1, page, 'string', true) checkType('_main', 3, options, 'table', true) if sections == nil then sections = {} elseif type(sections) == 'string' then sections = {sections} elseif type(sections) ~= 'table' then error(string.format( "type error in argument #2 to '_main' " .. "(string, table or nil expected, got %s)", type(sections) ), 2) end options = options or {} title = title or mw.title.getCurrentTitle() -- Deal with blank page names elegantly if page and not page:find('%S') then page = nil options.nopage = true end -- Make the link(s). local isShowingPage = not options.nopage if #sections <= 1 then local linkPage = page or '' local section = sections[1] or 'Notes' local display = '§&nbsp;' .. section if isShowingPage then page = page or title.prefixedText if options.display and options.display ~= '' then if normalizeTitle(options.display) == normalizeTitle(page) then display = options.display .. ' ' .. display else error(string.format( 'Display title "%s" was ignored since it is ' .. "not equivalent to the page's actual title", options.display ), 0) end else display = page .. ' ' .. display end end return makeSectionLink(linkPage, section, display) else -- Multiple sections. First, make a list of the links to display. local ret = {} for i, section in ipairs(sections) do ret[i] = makeSectionLink(page, section) end -- Assemble the list of links into a string with mw.text.listToText. -- We use the default separator for mw.text.listToText, but a custom -- conjunction. There is also a special case conjunction if we only -- have two links. local conjunction if #sections == 2 then conjunction = '&#8203; and ' else conjunction = ', and ' end ret = mw.text.listToText(ret, nil, conjunction) -- Add the intro text. local intro = '§§&nbsp;' if isShowingPage then intro = (page or title.prefixedText) .. ' ' .. intro end ret = intro .. ret return ret end end function p.main(frame) local yesno = require('Module:Yesno') local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Section link', valueFunc = function (key, value) value = value:match('^%s*(.-)%s*$') -- Trim whitespace -- Allow blank first parameters, as the wikitext template does this. if value ~= '' or key == 1 then return value end end }) for k, v in pairs(args) do -- replace underscores in the positional parameter values if 'number' == type(k) then if not yesno (args['keep-underscores']) then -- unless |keep-underscores=yes args[k] = mw.uri.decode (v, 'WIKI'); -- percent-decode; replace underscores with space characters else args[k] = mw.uri.decode (v, 'PATH'); -- percent-decode; retain underscores end end end -- Sort the arguments. local page local sections, options = {}, {} for k, v in pairs(args) do if k == 1 then -- Doing this in the loop because of a bug in [[Module:Arguments]] -- when using pairs with deleted arguments. page = mw.text.decode(v, true) elseif type(k) == 'number' then sections[k] = v else options[k] = v end end options.nopage = yesno (options.nopage); -- make boolean -- Extract section from page, if present if page then local p, s = page:match('^(.-)#(.*)$') if p then page, sections[1] = p, s end end -- Compress the sections array. local function compressArray(t) local nums, ret = {}, {} for num in pairs(t) do nums[#nums + 1] = num end table.sort(nums) for i, num in ipairs(nums) do ret[i] = t[num] end return ret end sections = compressArray(sections) return p._main(page, sections, options) end return p 712a4e62cbae4ef21220d701037b207aec105d45 Module:Template link general 828 105 269 268 2022-08-01T10:56:47Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This implements Template:Tlg local getArgs = require('Module:Arguments').getArgs local p = {} -- Is a string non-empty? local function _ne(s) return s ~= nil and s ~= "" end local nw = mw.text.nowiki local function addTemplate(s) local i, _ = s:find(':', 1, true) if i == nil then return 'Template:' .. s end local ns = s:sub(1, i - 1) if ns == '' or mw.site.namespaces[ns] then return s else return 'Template:' .. s end end local function trimTemplate(s) local needle = 'template:' if s:sub(1, needle:len()):lower() == needle then return s:sub(needle:len() + 1) else return s end end local function linkTitle(args) if _ne(args.nolink) then return args['1'] end local titleObj local titlePart = '[[' if args['1'] then -- This handles :Page and other NS titleObj = mw.title.new(args['1'], 'Template') else titleObj = mw.title.getCurrentTitle() end titlePart = titlePart .. (titleObj ~= nil and titleObj.fullText or addTemplate(args['1'])) local textPart = args.alttext if not _ne(textPart) then if titleObj ~= nil then textPart = titleObj:inNamespace("Template") and args['1'] or titleObj.fullText else -- redlink textPart = args['1'] end end if _ne(args.subst) then -- HACK: the ns thing above is probably broken textPart = 'subst:' .. textPart end if _ne(args.brace) then textPart = nw('{{') .. textPart .. nw('}}') elseif _ne(args.braceinside) then textPart = nw('{') .. textPart .. nw('}') end titlePart = titlePart .. '|' .. textPart .. ']]' if _ne(args.braceinside) then titlePart = nw('{') .. titlePart .. nw('}') end return titlePart end function p.main(frame) local args = getArgs(frame, { trim = true, removeBlanks = false }) return p._main(args) end function p._main(args) local bold = _ne(args.bold) or _ne(args.boldlink) or _ne(args.boldname) local italic = _ne(args.italic) or _ne(args.italics) local dontBrace = _ne(args.brace) or _ne(args.braceinside) local code = _ne(args.code) or _ne(args.tt) local show_result = _ne(args._show_result) local expand = _ne(args._expand) -- Build the link part local titlePart = linkTitle(args) if bold then titlePart = "'''" .. titlePart .. "'''" end if _ne(args.nowrapname) then titlePart = '<span class="nowrap">' .. titlePart .. '</span>' end -- Build the arguments local textPart = "" local textPartBuffer = "&#124;" local codeArguments = {} local codeArgumentsString = "" local i = 2 local j = 1 while args[i] do local val = args[i] if val ~= "" then if _ne(args.nowiki) then -- Unstrip nowiki tags first because calling nw on something that already contains nowiki tags will -- mangle the nowiki strip marker and result in literal UNIQ...QINU showing up val = nw(mw.text.unstripNoWiki(val)) end local k, v = string.match(val, "(.*)=(.*)") if not k then codeArguments[j] = val j = j + 1 else codeArguments[k] = v end codeArgumentsString = codeArgumentsString .. textPartBuffer .. val if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end textPart = textPart .. textPartBuffer .. val end i = i + 1 end -- final wrap local ret = titlePart .. textPart if not dontBrace then ret = nw('{{') .. ret .. nw('}}') end if _ne(args.a) then ret = nw('*') .. '&nbsp;' .. ret end if _ne(args.kbd) then ret = '<kbd>' .. ret .. '</kbd>' end if code then ret = '<code>' .. ret .. '</code>' elseif _ne(args.plaincode) then ret = '<code style="border:none;background:transparent;">' .. ret .. '</code>' end if _ne(args.nowrap) then ret = '<span class="nowrap">' .. ret .. '</span>' end --[[ Wrap as html?? local span = mw.html.create('span') span:wikitext(ret) --]] if _ne(args.debug) then ret = ret .. '\n<pre>' .. mw.text.encode(mw.dumpObject(args)) .. '</pre>' end if show_result then local result = mw.getCurrentFrame():expandTemplate{title = addTemplate(args[1]), args = codeArguments} ret = ret .. " → " .. result end if expand then local query = mw.text.encode('{{' .. addTemplate(args[1]) .. string.gsub(codeArgumentsString, textPartBuffer, "|") .. '}}') local url = mw.uri.fullUrl('special:ExpandTemplates', 'wpInput=' .. query) mw.log() ret = ret .. " [" .. tostring(url) .. "]" end return ret end return p c7307fa3959d308a2dd7fd2f5009c1ce6db3d122 Template:High-use 10 106 271 270 2022-08-01T10:56:48Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#invoke:High-use|main|1={{{1|}}}|2={{{2|}}}|all-pages={{{all-pages|}}}|info={{{info|}}}|demo={{{demo|}}}|form={{{form|}}}|expiry={{{expiry|}}}|system={{{system|}}}}}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage; interwiki links go to Wikidata, thank you! --> </noinclude> dc5ea36aa88cf409e3280bf65dbfc2566faffe29 Template:Module other 10 107 273 272 2022-08-01T10:56:49Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Module}} | module | other }} }} | module = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 503694836c1b07142e63fd35d8be69ec8bb9ffe7 Template:Module rating 10 108 275 274 2022-08-01T10:56:49Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly>{{#ifeq:{{SUBPAGENAME}}|doc|<!--do not show protection level of the module on the doc page, use the second and optionally third parameter if the doc page is also protected -->{{#if:{{{2|}}}|{{Pp|{{{2}}}|action={{{3|}}}}}}}|{{Module other|{{ombox | type = notice | image = {{#switch: {{{1|}}} | pre-alpha | prealpha | pa = [[File:Ambox warning blue construction.svg|40x40px|link=|alt=Pre-alpha]] | alpha | a = [[File:Alpha lowercase.svg|26x26px|link=|alt=Alpha]] | beta | b = [[File:Greek lc beta.svg|40x40px|link=|alt=Beta]] | release | r | general | g = [[File:Green check.svg|40x40px|link=|alt=Ready for use]] | protected | protect | p = [[File:{{#switch:{{#invoke:Effective protection level|edit|{{#switch:{{SUBPAGENAME}}|doc|sandbox={{FULLBASEPAGENAME}}|{{FULLPAGENAME}}}}}}|autoconfirmed=Semi|extendedconfirmed=Extended|accountcreator|templateeditor=Template|#default=Full}}-protection-shackle.svg|40x40px|link=|alt=Protected]] | semiprotected | semiprotect | semi =[[File:Semi-protection-shackle.svg|40x40px|link=|alt=Semi-protected]] }} | style = | textstyle = | text = {{#switch: {{{1|}}} | pre-alpha | prealpha | pa = This module is rated as [[:Category:Modules in pre-alpha development|pre-alpha]]. It is unfinished, and may or may not be in active development. It should not be used from article namespace pages. Modules remain pre-alpha until the original editor (or someone who takes one over if it is abandoned for some time) is satisfied with the basic structure.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules in pre-alpha development|{{PAGENAME}}]] }} }} | alpha | a = This module is rated as [[:Category:Modules in alpha|alpha]]. It is ready for third-party input, and may be used on a few pages to see if problems arise, but should be watched. Suggestions for new features or changes in their input and output mechanisms are welcome.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules in alpha|{{PAGENAME}}]] }} }} | beta | b = This module is rated as [[:Category:Modules in beta|beta]], and is ready for widespread use. It is still new and should be used with some caution to ensure the results are as expected.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules in beta|{{PAGENAME}}]] }} }} | release | r | general | g = This module is rated as [[:Category:Modules for general use|ready for general use]]. It has reached a mature form and is thought to be relatively bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other Wikipedia resources as an option for new users to learn. To reduce server load and bad output, it should be improved by [[Wikipedia:Template sandbox and test cases|sandbox testing]] rather than repeated trial-and-error editing.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules for general use|{{PAGENAME}}]] }} }} | protected | protect | p = This module is [[:Category:Modules subject to page protection|subject to page protection]]. It is a [[Wikipedia:High-risk templates|highly visible module]] in use by a very large number of pages, or is [[Wikipedia:Substitution|substituted]] very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is [[Wikipedia:Protection policy|protected]] from editing.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules subject to page protection|{{PAGENAME}}]] }} }} | semiprotected | semiprotect | semi = This module is [[:Category:Modules subject to page protection|subject to page protection]]. It is a [[Wikipedia:High-risk templates|highly visible module]] in use by a very large number of pages, or is [[Wikipedia:Substitution|substituted]] very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is [[WP:SEMI|semi-protected]] from editing.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules subject to page protection|{{PAGENAME}}]] }} }} | #default = {{error|Module rating is invalid or not specified.}} }} }}|{{error|Error: {{tl|Module rating}} must be placed in the Module namespace.}} [[Category:Pages with templates in the wrong namespace]]|demospace={{{demospace|<noinclude>module</noinclude>}}}}}}}</includeonly><noinclude> {{module rating|release|nocat=true|demospace=module}} {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go in Wikidata. --> </noinclude> bbd244b3ea2e13ec4c1c810ae44f2f3789a93efc Template:Ombox 10 109 277 276 2022-08-01T10:56:50Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#invoke:Message box|ombox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 0e54065432d540737b9e56c4e3a8e7f74d4534ea Template:Uses TemplateStyles 10 110 279 278 2022-08-01T10:56:50Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:Uses TemplateStyles|main}}</includeonly><noinclude> {{Uses TemplateStyles|Template:Uses TemplateStyles/example.css|nocat=true}} {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 7e26d8f257e302bd8a3dcbe53f52741ae0884f74 Module:High-use 828 111 281 280 2022-08-01T10:56:51Z 17ademoladav 2 1 revision imported Scribunto text/plain local p = {} -- _fetch looks at the "demo" argument. local _fetch = require('Module:Transclusion_count').fetch local yesno = require('Module:Yesno') function p.num(frame, count) if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end -- Build output string local return_value = "" if count == nil then if frame.args[1] == "risk" then return_value = "a very large number of" else return_value = "many" end else -- Use 2 significant figures for smaller numbers and 3 for larger ones local sigfig = 2 if count >= 100000 then sigfig = 3 end -- Prepare to round to appropriate number of sigfigs local f = math.floor(math.log10(count)) - sigfig + 1 -- Round and insert "approximately" or "+" when appropriate if (frame.args[2] == "yes") or (mw.ustring.sub(frame.args[1],-1) == "+") then -- Round down return_value = string.format("%s+", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) ) * (10^(f))) ) else -- Round to nearest return_value = string.format("approximately&#x20;%s", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) + 0.5) * (10^(f))) ) end -- Insert percentage of pages if that is likely to be >= 1% and when |no-percent= not set to yes if count and count > 250000 and not yesno (frame:getParent().args['no-percent']) then local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5) if percent >= 1 then return_value = string.format("%s&#x20;pages, or roughly %s%% of all", return_value, percent) end end end return return_value end -- Actions if there is a large (greater than or equal to 100,000) transclusion count function p.risk(frame) local return_value = "" if frame.args[1] == "risk" then return_value = "risk" else local count = _fetch(frame) if count and count >= 100000 then return_value = "risk" end end return return_value end function p.text(frame, count) -- Only show the information about how this template gets updated if someone -- is actually editing the page and maybe trying to update the count. local bot_text = (frame:preprocess("{{REVISIONID}}") == "") and "\n\n----\n'''Preview message''': Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]])." or '' if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end local title = mw.title.getCurrentTitle() if title.subpageText == "doc" or title.subpageText == "sandbox" then title = title.basePageTitle end local systemMessages = frame.args['system'] if frame.args['system'] == '' then systemMessages = nil end -- This retrieves the project URL automatically to simplify localiation. local templateCount = ('on [https://linkcount.toolforge.org/index.php?project=%s&page=%s %s pages]'):format( mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'), mw.uri.encode(title.fullText), p.num(frame, count)) local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used '; if systemMessages then used_on_text = used_on_text .. systemMessages .. ((count and count > 2000) and ("''', and " .. templateCount) or ("'''")) else used_on_text = used_on_text .. templateCount .. "'''" end local sandbox_text = ("%s's [[%s/sandbox|/sandbox]] or [[%s/testcases|/testcases]] subpages, or in your own [[%s]]. "):format( (mw.title.getCurrentTitle().namespace == 828 and "module" or "template"), title.fullText, title.fullText, mw.title.getCurrentTitle().namespace == 828 and "Module:Sandbox|module sandbox" or "Wikipedia:User pages#SUB|user subpage" ) local infoArg = frame.args["info"] ~= "" and frame.args["info"] if (systemMessages or frame.args[1] == "risk" or (count and count >= 100000) ) then local info = systemMessages and '.<br/>Changes to it can cause immediate changes to the Wikipedia user interface.' or '.' if infoArg then info = info .. "<br />" .. infoArg end sandbox_text = info .. '<br /> To avoid major disruption' .. (count and count >= 100000 and ' and server load' or '') .. ', any changes should be tested in the ' .. sandbox_text .. 'The tested changes can be added to this page in a single edit. ' else sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' and c') .. 'hanges may be widely noticed. Test changes in the ' .. sandbox_text end local discussion_text = systemMessages and 'Please discuss changes ' or 'Consider discussing changes ' if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then discussion_text = string.format("%sat [[%s]]", discussion_text, frame.args["2"]) else discussion_text = string.format("%son the [[%s|talk page]]", discussion_text, title.talkPageTitle.fullText ) end return used_on_text .. sandbox_text .. discussion_text .. " before implementing them." .. bot_text end function p.main(frame) local count = nil if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end local image = "[[File:Ambox warning yellow.svg|40px|alt=Warning|link=]]" local type_param = "style" local epilogue = '' if frame.args['system'] and frame.args['system'] ~= '' then image = "[[File:Ambox important.svg|40px|alt=Warning|link=]]" type_param = "content" local nocat = frame:getParent().args['nocat'] or frame.args['nocat'] local categorise = (nocat == '' or not yesno(nocat)) if categorise then epilogue = frame:preprocess('{{Sandbox other||{{#switch:{{#invoke:Effective protection level|{{#switch:{{NAMESPACE}}|File=upload|#default=edit}}|{{FULLPAGENAME}}}}|sysop|templateeditor|interfaceadmin=|#default=[[Category:Pages used in system messages needing protection]]}}}}') end elseif (frame.args[1] == "risk" or (count and count >= 100000)) then image = "[[File:Ambox warning orange.svg|40px|alt=Warning|link=]]" type_param = "content" end if frame.args["form"] == "editnotice" then return frame:expandTemplate{ title = 'editnotice', args = { ["image"] = image, ["text"] = p.text(frame, count), ["expiry"] = (frame.args["expiry"] or "") } } .. epilogue else return require('Module:Message box').main('ombox', { type = type_param, image = image, text = p.text(frame, count), expiry = (frame.args["expiry"] or "") }) .. epilogue end end return p e65a49e327a83e27b6a35ceff8dce344edee0840 Module:Infobox/doc 828 112 283 282 2022-08-01T10:56:52Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{High-use|3308957|all-pages = yes}} {{module rating|protected}} {{Lua|Module:Navbar}} {{Uses TemplateStyles|Module:Infobox/styles.css}} '''Module:Infobox''' is a [[WP:Module|module]] that implements the {{tl|Infobox}} template. Please see the template page for usage instructions. == Tracking categories == * {{clc|Pages using infobox templates with ignored data cells}} * {{clc|Articles using infobox templates with no data rows}} * {{clc|Pages using embedded infobox templates with the title parameter}} <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| [[Category:Modules that add a tracking category|{{PAGENAME}}]] [[Category:Wikipedia infoboxes]] [[Category:Infobox modules]] [[Category:Modules that check for strip markers‎]] }}</includeonly> fe846798cf7108b8be9eed59be9f70e9627cebc3 Module:TNT 828 113 285 284 2022-08-01T10:56:52Z 17ademoladav 2 1 revision imported Scribunto text/plain -- -- INTRO: (!!! DO NOT RENAME THIS PAGE !!!) -- This module allows any template or module to be copy/pasted between -- wikis without any translation changes. All translation text is stored -- in the global Data:*.tab pages on Commons, and used everywhere. -- -- SEE: https://www.mediawiki.org/wiki/Multilingual_Templates_and_Modules -- -- ATTENTION: -- Please do NOT rename this module - it has to be identical on all wikis. -- This code is maintained at https://www.mediawiki.org/wiki/Module:TNT -- Please do not modify it anywhere else, as it may get copied and override your changes. -- Suggestions can be made at https://www.mediawiki.org/wiki/Module_talk:TNT -- -- DESCRIPTION: -- The "msg" function uses a Commons dataset to translate a message -- with a given key (e.g. source-table), plus optional arguments -- to the wiki markup in the current content language. -- Use lang=xx to set language. Example: -- -- {{#invoke:TNT | msg -- | I18n/Template:Graphs.tab <!-- https://commons.wikimedia.org/wiki/Data:I18n/Template:Graphs.tab --> -- | source-table <!-- uses a translation message with id = "source-table" --> -- | param1 }} <!-- optional parameter --> -- -- -- The "doc" function will generate the <templatedata> parameter documentation for templates. -- This way all template parameters can be stored and localized in a single Commons dataset. -- NOTE: "doc" assumes that all documentation is located in Data:Templatedata/* on Commons. -- -- {{#invoke:TNT | doc | Graph:Lines }} -- uses https://commons.wikimedia.org/wiki/Data:Templatedata/Graph:Lines.tab -- if the current page is Template:Graph:Lines/doc -- local p = {} local i18nDataset = 'I18n/Module:TNT.tab' -- Forward declaration of the local functions local sanitizeDataset, loadData, link, formatMessage function p.msg(frame) local dataset, id local params = {} local lang = nil for k, v in pairs(frame.args) do if k == 1 then dataset = mw.text.trim(v) elseif k == 2 then id = mw.text.trim(v) elseif type(k) == 'number' then table.insert(params, mw.text.trim(v)) elseif k == 'lang' and v ~= '_' then lang = mw.text.trim(v) end end return formatMessage(dataset, id, params, lang) end -- Identical to p.msg() above, but used from other lua modules -- Parameters: name of dataset, message key, optional arguments -- Example with 2 params: format('I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset') function p.format(dataset, key, ...) local checkType = require('libraryUtil').checkType checkType('format', 1, dataset, 'string') checkType('format', 2, key, 'string') return formatMessage(dataset, key, {...}) end -- Identical to p.msg() above, but used from other lua modules with the language param -- Parameters: language code, name of dataset, message key, optional arguments -- Example with 2 params: formatInLanguage('es', I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset') function p.formatInLanguage(lang, dataset, key, ...) local checkType = require('libraryUtil').checkType checkType('formatInLanguage', 1, lang, 'string') checkType('formatInLanguage', 2, dataset, 'string') checkType('formatInLanguage', 3, key, 'string') return formatMessage(dataset, key, {...}, lang) end -- Obsolete function that adds a 'c:' prefix to the first param. -- "Sandbox/Sample.tab" -> 'c:Data:Sandbox/Sample.tab' function p.link(frame) return link(frame.args[1]) end function p.doc(frame) local dataset = 'Templatedata/' .. sanitizeDataset(frame.args[1]) return frame:extensionTag('templatedata', p.getTemplateData(dataset)) .. formatMessage(i18nDataset, 'edit_doc', {link(dataset)}) end function p.getTemplateData(dataset) -- TODO: add '_' parameter once lua starts reindexing properly for "all" languages local data = loadData(dataset) local names = {} for _, field in pairs(data.schema.fields) do table.insert(names, field.name) end local params = {} local paramOrder = {} for _, row in pairs(data.data) do local newVal = {} local name = nil for pos, val in pairs(row) do local columnName = names[pos] if columnName == 'name' then name = val else newVal[columnName] = val end end if name then params[name] = newVal table.insert(paramOrder, name) end end -- Work around json encoding treating {"1":{...}} as an [{...}] params['zzz123']='' local json = mw.text.jsonEncode({ params=params, paramOrder=paramOrder, description=data.description }) json = string.gsub(json,'"zzz123":"",?', "") return json end -- Local functions sanitizeDataset = function(dataset) if not dataset then return nil end dataset = mw.text.trim(dataset) if dataset == '' then return nil elseif string.sub(dataset,-4) ~= '.tab' then return dataset .. '.tab' else return dataset end end loadData = function(dataset, lang) dataset = sanitizeDataset(dataset) if not dataset then error(formatMessage(i18nDataset, 'error_no_dataset', {})) end -- Give helpful error to thirdparties who try and copy this module. if not mw.ext or not mw.ext.data or not mw.ext.data.get then error('Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:' .. dataset) end local data = mw.ext.data.get(dataset, lang) if data == false then if dataset == i18nDataset then -- Prevent cyclical calls error('Missing Commons dataset ' .. i18nDataset) else error(formatMessage(i18nDataset, 'error_bad_dataset', {link(dataset)})) end end return data end -- Given a dataset name, convert it to a title with the 'commons:data:' prefix link = function(dataset) return 'c:Data:' .. mw.text.trim(dataset or '') end formatMessage = function(dataset, key, params, lang) for _, row in pairs(loadData(dataset, lang).data) do local id, msg = unpack(row) if id == key then local result = mw.message.newRawMessage(msg, unpack(params or {})) return result:plain() end end if dataset == i18nDataset then -- Prevent cyclical calls error('Invalid message key "' .. key .. '"') else error(formatMessage(i18nDataset, 'error_bad_msgkey', {key, link(dataset)})) end end return p 9d0d10e54abd232c806dcabccaf03e52858634a1 Module:Transclusion count 828 114 287 286 2022-08-01T10:56:53Z 17ademoladav 2 1 revision imported Scribunto text/plain local p = {} function p.fetch(frame) local template = nil local return_value = nil -- Use demo parameter if it exists, otherswise use current template name local namespace = mw.title.getCurrentTitle().namespace if frame.args["demo"] and frame.args["demo"] ~= "" then template = frame.args["demo"] elseif namespace == 10 then -- Template namespace template = mw.title.getCurrentTitle().text elseif namespace == 828 then -- Module namespace template = (mw.site.namespaces[828].name .. ":" .. mw.title.getCurrentTitle().text) end -- If in template or module namespace, look up count in /data if template ~= nil then namespace = mw.title.new(template, "Template").namespace if namespace == 10 or namespace == 828 then template = mw.ustring.gsub(template, "/doc$", "") -- strip /doc from end local index = mw.ustring.sub(mw.title.new(template).text,1,1) local status, data = pcall(function () return(mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other"))) end) if status then return_value = tonumber(data[mw.ustring.gsub(template, " ", "_")]) end end end -- If database value doesn't exist, use value passed to template if return_value == nil and frame.args[1] ~= nil then local arg1=mw.ustring.match(frame.args[1], '[%d,]+') if arg1 and arg1 ~= '' then return_value = tonumber(frame:callParserFunction('formatnum', arg1, 'R')) end end return return_value end -- Tabulate this data for [[Wikipedia:Database reports/Templates transcluded on the most pages]] function p.tabulate(frame) local list = {} for i = 65, 91 do local data = mw.loadData('Module:Transclusion count/data/' .. ((i == 91) and 'other' or string.char(i))) for name, count in pairs(data) do table.insert(list, {mw.title.new(name, "Template").fullText, count}) end end table.sort(list, function(a, b) return (a[2] == b[2]) and (a[1] < b[1]) or (a[2] > b[2]) end) local lang = mw.getContentLanguage(); for i = 1, #list do list[i] = ('|-\n| %d || [[%s]] || %s\n'):format(i, list[i][1]:gsub('_', ' '), lang:formatNum(list[i][2])) end return table.concat(list) end return p 9b2940dfd623cf550f748fd5bfc25b7f69cd14cd Module:Transclusion count/data/I 828 115 289 288 2022-08-01T10:56:53Z 17ademoladav 2 1 revision imported Scribunto text/plain return { ["IAAF_name"] = 2200, ["IAST"] = 5700, ["IBDB_name"] = 9000, ["ICD10"] = 4600, ["ICD9"] = 4400, ["ICS"] = 2800, ["IDN"] = 3200, ["IMDb_episode"] = 9100, ["IMDb_episodes"] = 2100, ["IMDb_name"] = 148000, ["IMDb_title"] = 182000, ["IMO_Number"] = 3900, ["IMSLP"] = 7800, ["IND"] = 7500, ["INR"] = 5900, ["INRConvert"] = 5200, ["INRConvert/CurrentRate"] = 5200, ["INRConvert/USD"] = 5200, ["INRConvert/out"] = 5200, ["IOC_profile"] = 6400, ["IP"] = 2500, ["IPA"] = 132000, ["IPA-all"] = 3300, ["IPA-de"] = 7400, ["IPA-es"] = 7600, ["IPA-fr"] = 39000, ["IPA-it"] = 5600, ["IPA-nl"] = 3400, ["IPA-pl"] = 3800, ["IPA-pt"] = 3500, ["IPA-ru"] = 2500, ["IPA-sh"] = 2700, ["IPA-sl"] = 6800, ["IPA-th"] = 2900, ["IPA_audio_link"] = 17000, ["IPA_link"] = 3000, ["IPAc-cmn"] = 2500, ["IPAc-en"] = 45000, ["IPAc-pl"] = 52000, ["IPC_athlete"] = 2400, ["IPSummary"] = 77000, ["IP_summary"] = 78000, ["IPsock"] = 13000, ["IPtalk"] = 26000, ["IPuser"] = 7000, ["IPvandal"] = 12000, ["IRC"] = 9500, ["IRI"] = 2100, ["IRL"] = 5300, ["IRN"] = 3500, ["ISBN"] = 457000, ["ISBNT"] = 37000, ["ISL"] = 2000, ["ISO_15924/script-example-character"] = 2700, ["ISO_15924/wp-article"] = 2700, ["ISO_15924/wp-article/format"] = 2700, ["ISO_15924/wp-article/label"] = 2600, ["ISO_3166_code"] = 224000, ["ISO_3166_name"] = 16000, ["ISO_639_name"] = 6400, ["ISP"] = 6900, ["ISR"] = 4500, ["ISSN"] = 11000, ["ISSN_link"] = 29000, ["ISTAT"] = 8100, ["ISU_figure_skater"] = 2400, ["ITA"] = 17000, ["ITF"] = 5700, ["ITF_profile"] = 8500, ["ITIS"] = 4200, ["ITN_talk"] = 9000, ["ITN_talk/date"] = 9000, ["IUCN_banner"] = 15000, ["I_sup"] = 4400, ["Iaaf_name"] = 7400, ["Ice_hockey"] = 20000, ["Ice_hockey_stats"] = 15000, ["Icehockeystats"] = 11000, ["Icon"] = 546000, ["If"] = 256000, ["If_all"] = 5600, ["If_between"] = 3700, ["If_both"] = 9640000, ["If_empty"] = 2860000, ["If_first_display_both"] = 60000, ["If_in_page"] = 7300, ["If_last_display_both"] = 27000, ["If_preview"] = 55000, ["If_then_show"] = 233000, ["Ifempty"] = 4100, ["Iferror_then_show"] = 2900, ["Ifexist_not_redirect"] = 1080000, ["Ifnotempty"] = 13000, ["Ifnumber"] = 23000, ["Ifsubst"] = 65000, ["Ih"] = 7500, ["Ill"] = 94000, ["Illm"] = 6900, ["Image_frame"] = 3500, ["Image_label"] = 4500, ["Image_label_begin"] = 3800, ["Image_label_end"] = 3400, ["Image_label_small"] = 2600, ["Image_needed"] = 4500, ["Image_other"] = 291000, ["Image_requested"] = 169000, ["Image_requested/Category_helper"] = 162000, ["Imbox"] = 904000, ["Imdb_name"] = 5300, ["Imdb_title"] = 5800, ["Import_style"] = 12000, ["Import_style/inputbox.css"] = 12000, ["Importance"] = 5450000, ["Importance/colour"] = 5460000, ["Importance_mask"] = 8630000, ["Improve_categories"] = 6300, ["In_class"] = 5100, ["In_lang"] = 341000, ["In_progress"] = 2800, ["In_string"] = 63000, ["In_title"] = 17000, ["Inactive_WikiProject_banner"] = 177000, ["Inactive_userpage_blanked"] = 4700, ["Include-USGov"] = 30000, ["Incomplete_list"] = 22000, ["Increase"] = 39000, ["Incumbent_pope"] = 4300, ["Indent"] = 3900, ["IndexFungorum"] = 2200, ["Indian_English"] = 3900, ["Indian_Rupee"] = 9600, ["Indian_railway_code"] = 3100, ["Inflation"] = 17000, ["Inflation-fn"] = 5100, ["Inflation-year"] = 4200, ["Inflation/IN/startyear"] = 5200, ["Inflation/UK"] = 4000, ["Inflation/UK/dataset"] = 4000, ["Inflation/UK/startyear"] = 4000, ["Inflation/US"] = 11000, ["Inflation/US/dataset"] = 11000, ["Inflation/US/startyear"] = 11000, ["Inflation/fn"] = 5700, ["Inflation/year"] = 21000, ["Info"] = 7100, ["Infobox"] = 3490000, ["Infobox/Columns"] = 2100, ["Infobox/mobileviewfix.css"] = 17000, ["Infobox3cols"] = 290000, ["Infobox_AFL_biography"] = 14000, ["Infobox_Aircraft_Begin"] = 5700, ["Infobox_Aircraft_Type"] = 5000, ["Infobox_Athletics_Championships"] = 2500, ["Infobox_Australian_place"] = 15000, ["Infobox_CFL_biography"] = 2300, ["Infobox_COA_wide"] = 2900, ["Infobox_Canada_electoral_district"] = 2400, ["Infobox_Canadian_Football_League_biography"] = 5900, ["Infobox_Canadian_Football_League_biography/position"] = 5900, ["Infobox_Chinese"] = 18000, ["Infobox_Chinese/Footer"] = 8800, ["Infobox_Chinese/Header"] = 8800, ["Infobox_Chinese/Korean"] = 14000, ["Infobox_Christian_leader"] = 17000, ["Infobox_Election"] = 2500, ["Infobox_French_commune"] = 37000, ["Infobox_GAA_player"] = 3200, ["Infobox_Gaelic_Athletic_Association_player"] = 4800, ["Infobox_German_location"] = 13000, ["Infobox_German_place"] = 14000, ["Infobox_Greece_place"] = 2800, ["Infobox_Greek_Dimos"] = 2800, ["Infobox_Hindu_temple"] = 2300, ["Infobox_Indian_state_legislative_assembly_constituency"] = 3600, ["Infobox_Italian_comune"] = 8100, ["Infobox_Korean_name"] = 15000, ["Infobox_Korean_name/categories"] = 14000, ["Infobox_MLB_yearly"] = 3000, ["Infobox_NCAA_team_season"] = 19000, ["Infobox_NFL_biography"] = 27000, ["Infobox_NFL_player"] = 8400, ["Infobox_NFL_season"] = 2600, ["Infobox_NFL_team_season"] = 3800, ["Infobox_NRHP"] = 72000, ["Infobox_NRHP/conv"] = 18000, ["Infobox_NRHP/locmapin2region"] = 65000, ["Infobox_Newspaper"] = 2000, ["Infobox_Officeholder"] = 6100, ["Infobox_Olympic_event"] = 7200, ["Infobox_Olympic_event/games_text"] = 7200, ["Infobox_Paralympic_event"] = 2500, ["Infobox_Paralympic_event/games_text"] = 2500, ["Infobox_Person"] = 2200, ["Infobox_Politician"] = 2700, ["Infobox_Romanian_subdivision"] = 3100, ["Infobox_Russian_district"] = 2000, ["Infobox_Russian_inhabited_locality"] = 4300, ["Infobox_SCOTUS_case"] = 3600, ["Infobox_Site_of_Special_Scientific_Interest"] = 2000, ["Infobox_Software"] = 2000, ["Infobox_Swiss_town"] = 2800, ["Infobox_Switzerland_municipality"] = 2900, ["Infobox_U.S._county"] = 3000, ["Infobox_U.S._county/district"] = 3000, ["Infobox_UK_legislation"] = 2200, ["Infobox_UK_place"] = 25000, ["Infobox_UK_place/NoDialCode"] = 7700, ["Infobox_UK_place/NoPostCode"] = 2800, ["Infobox_UK_place/area"] = 2300, ["Infobox_UK_place/dist"] = 2400, ["Infobox_UK_place/local"] = 25000, ["Infobox_UK_place/styles.css"] = 25000, ["Infobox_UN_resolution"] = 2200, ["Infobox_US_Supreme_Court_case"] = 3800, ["Infobox_US_Supreme_Court_case/courts"] = 3700, ["Infobox_Wikipedia_user"] = 8900, ["Infobox_YouTube_personality"] = 2300, ["Infobox_academic"] = 11000, ["Infobox_aircraft_begin"] = 14000, ["Infobox_aircraft_occurrence"] = 2200, ["Infobox_aircraft_type"] = 13000, ["Infobox_airline"] = 4500, ["Infobox_airport"] = 15000, ["Infobox_airport/datatable"] = 15000, ["Infobox_album"] = 158000, ["Infobox_album/color"] = 185000, ["Infobox_album/link"] = 159000, ["Infobox_anatomy"] = 4400, ["Infobox_ancient_site"] = 4900, ["Infobox_animanga/Footer"] = 6500, ["Infobox_animanga/Header"] = 6500, ["Infobox_animanga/Print"] = 5100, ["Infobox_animanga/Video"] = 4500, ["Infobox_architect"] = 3400, ["Infobox_artist"] = 27000, ["Infobox_artist_discography"] = 5700, ["Infobox_artwork"] = 10000, ["Infobox_athlete"] = 3200, ["Infobox_automobile"] = 8000, ["Infobox_award"] = 12000, ["Infobox_badminton_player"] = 3100, ["Infobox_baseball_biography"] = 28000, ["Infobox_baseball_biography/style"] = 28000, ["Infobox_baseball_biography/styles.css"] = 28000, ["Infobox_basketball_biography"] = 20000, ["Infobox_basketball_biography/style"] = 20000, ["Infobox_basketball_club"] = 2900, ["Infobox_beauty_pageant"] = 2200, ["Infobox_bilateral_relations"] = 4200, ["Infobox_body_of_water"] = 17000, ["Infobox_book"] = 50000, ["Infobox_boxer"] = 5500, ["Infobox_bridge"] = 5800, ["Infobox_building"] = 25000, ["Infobox_character"] = 7700, ["Infobox_chess_biography"] = 3400, ["Infobox_chess_player"] = 2900, ["Infobox_church"] = 14000, ["Infobox_church/denomination"] = 14000, ["Infobox_church/font_color"] = 14000, ["Infobox_civil_conflict"] = 2100, ["Infobox_civilian_attack"] = 4700, ["Infobox_college_coach"] = 11000, ["Infobox_college_sports_team_season"] = 36000, ["Infobox_college_sports_team_season/link"] = 36000, ["Infobox_college_sports_team_season/name"] = 36000, ["Infobox_college_sports_team_season/succession"] = 36000, ["Infobox_college_sports_team_season/team"] = 36000, ["Infobox_comic_book_title"] = 2900, ["Infobox_comics_character"] = 3600, ["Infobox_comics_creator"] = 3400, ["Infobox_company"] = 81000, ["Infobox_concert"] = 3200, ["Infobox_constituency"] = 4900, ["Infobox_country"] = 6000, ["Infobox_country/formernext"] = 5800, ["Infobox_country/imagetable"] = 4900, ["Infobox_country/multirow"] = 7800, ["Infobox_country/status_text"] = 2600, ["Infobox_country/styles.css"] = 6000, ["Infobox_country_at_games"] = 14000, ["Infobox_country_at_games/core"] = 14000, ["Infobox_country_at_games/see_also"] = 11000, ["Infobox_court_case"] = 4400, ["Infobox_court_case/images"] = 2300, ["Infobox_cricket_tournament"] = 2100, ["Infobox_cricketer"] = 32000, ["Infobox_cricketer/career"] = 32000, ["Infobox_cricketer/national_side"] = 7600, ["Infobox_criminal"] = 5600, ["Infobox_curler"] = 2500, ["Infobox_cycling_race_report"] = 4300, ["Infobox_cyclist"] = 16000, ["Infobox_dam"] = 5300, ["Infobox_designation_list"] = 18000, ["Infobox_designation_list/entry"] = 16000, ["Infobox_dim"] = 6500, ["Infobox_dim/core"] = 6500, ["Infobox_diocese"] = 3800, ["Infobox_drug"] = 9000, ["Infobox_drug/chemical_formula"] = 9100, ["Infobox_drug/data_page_link"] = 9100, ["Infobox_drug/formatATC"] = 8900, ["Infobox_drug/formatCASnumber"] = 9100, ["Infobox_drug/formatChEBI"] = 9100, ["Infobox_drug/formatChEMBL"] = 9100, ["Infobox_drug/formatChemDBNIAID"] = 9100, ["Infobox_drug/formatChemSpider"] = 9100, ["Infobox_drug/formatCompTox"] = 9100, ["Infobox_drug/formatDrugBank"] = 9100, ["Infobox_drug/formatIUPHARBPS"] = 9100, ["Infobox_drug/formatJmol"] = 9100, ["Infobox_drug/formatKEGG"] = 9100, ["Infobox_drug/formatPDBligand"] = 8400, ["Infobox_drug/formatPubChemCID"] = 9100, ["Infobox_drug/formatPubChemSID"] = 9100, ["Infobox_drug/formatUNII"] = 9100, ["Infobox_drug/legal_status"] = 9200, ["Infobox_drug/licence"] = 9100, ["Infobox_drug/maintenance_categories"] = 9100, ["Infobox_drug/pregnancy_category"] = 9100, ["Infobox_drug/title"] = 9100, ["Infobox_election"] = 26000, ["Infobox_election/row"] = 26000, ["Infobox_election/shortname"] = 25000, ["Infobox_enzyme"] = 5100, ["Infobox_ethnic_group"] = 6900, ["Infobox_event"] = 4600, ["Infobox_figure_skater"] = 4100, ["Infobox_film"] = 150000, ["Infobox_film/short_description"] = 146000, ["Infobox_film_awards"] = 2400, ["Infobox_film_awards/link"] = 2400, ["Infobox_film_awards/style"] = 2400, ["Infobox_food"] = 6600, ["Infobox_football_biography"] = 200000, ["Infobox_football_club"] = 26000, ["Infobox_football_club_season"] = 19000, ["Infobox_football_league"] = 2500, ["Infobox_football_league_season"] = 18000, ["Infobox_football_match"] = 5500, ["Infobox_football_tournament_season"] = 6900, ["Infobox_former_subdivision"] = 3200, ["Infobox_former_subdivision/styles.css"] = 3200, ["Infobox_game"] = 2300, ["Infobox_game_score"] = 3300, ["Infobox_gene"] = 13000, ["Infobox_given_name"] = 3900, ["Infobox_golfer"] = 4200, ["Infobox_golfer/highest_ranking"] = 4200, ["Infobox_government_agency"] = 9700, ["Infobox_government_cabinet"] = 2300, ["Infobox_gridiron_football_person"] = 2800, ["Infobox_gridiron_football_person/position"] = 5900, ["Infobox_gymnast"] = 3200, ["Infobox_handball_biography"] = 4700, ["Infobox_historic_site"] = 10000, ["Infobox_horseraces"] = 2500, ["Infobox_hospital"] = 6100, ["Infobox_hospital/care_system"] = 6100, ["Infobox_hospital/lists"] = 6100, ["Infobox_ice_hockey_biography"] = 19000, ["Infobox_ice_hockey_player"] = 19000, ["Infobox_ice_hockey_team"] = 2200, ["Infobox_ice_hockey_team_season"] = 2000, ["Infobox_information_appliance"] = 2200, ["Infobox_international_football_competition"] = 5400, ["Infobox_islands"] = 8400, ["Infobox_islands/area"] = 8800, ["Infobox_islands/density"] = 8800, ["Infobox_islands/length"] = 8400, ["Infobox_islands/styles.css"] = 8400, ["Infobox_journal"] = 9500, ["Infobox_journal/Abbreviation_search"] = 9400, ["Infobox_journal/Bluebook_check"] = 9200, ["Infobox_journal/Former_check"] = 9200, ["Infobox_journal/ISO_4_check"] = 9200, ["Infobox_journal/ISSN-eISSN"] = 9200, ["Infobox_journal/Indexing_search"] = 9300, ["Infobox_journal/MathSciNet_check"] = 9200, ["Infobox_journal/NLM_check"] = 9200, ["Infobox_journal/frequency"] = 8300, ["Infobox_judge"] = 2300, ["Infobox_lake"] = 4600, ["Infobox_language"] = 9300, ["Infobox_language/family-color"] = 11000, ["Infobox_language/genetic"] = 6500, ["Infobox_language/linguistlist"] = 9400, ["Infobox_language/ref"] = 6900, ["Infobox_legislature"] = 3400, ["Infobox_library"] = 2000, ["Infobox_lighthouse"] = 2600, ["Infobox_lighthouse/light"] = 2600, ["Infobox_locomotive"] = 4800, ["Infobox_magazine"] = 7300, ["Infobox_manner_of_address"] = 3200, ["Infobox_mapframe"] = 75000, ["Infobox_martial_artist"] = 5500, ["Infobox_martial_artist/record"] = 5500, ["Infobox_medal_templates"] = 409000, ["Infobox_medical_condition"] = 9700, ["Infobox_medical_condition_(new)"] = 8200, ["Infobox_military_conflict"] = 20000, ["Infobox_military_installation"] = 9200, ["Infobox_military_person"] = 42000, ["Infobox_military_unit"] = 25000, ["Infobox_mine"] = 2100, ["Infobox_model"] = 2300, ["Infobox_mountain"] = 27000, ["Infobox_museum"] = 9600, ["Infobox_musical_artist"] = 118000, ["Infobox_musical_artist/color"] = 118000, ["Infobox_musical_artist/hCard_class"] = 304000, ["Infobox_musical_composition"] = 2600, ["Infobox_name"] = 7200, ["Infobox_name_module"] = 11000, ["Infobox_newspaper"] = 9200, ["Infobox_nobility"] = 2400, ["Infobox_noble"] = 6700, ["Infobox_officeholder"] = 198000, ["Infobox_officeholder/office"] = 203000, ["Infobox_official_post"] = 7300, ["Infobox_organization"] = 34000, ["Infobox_pageant_titleholder"] = 2800, ["Infobox_park"] = 6900, ["Infobox_person"] = 443000, ["Infobox_person/Wikidata"] = 4500, ["Infobox_person/height"] = 110000, ["Infobox_person/length"] = 6800, ["Infobox_person/weight"] = 75000, ["Infobox_philosopher"] = 3200, ["Infobox_planet"] = 4600, ["Infobox_play"] = 3600, ["Infobox_political_party"] = 13000, ["Infobox_power_station"] = 2900, ["Infobox_prepared_food"] = 3400, ["Infobox_professional_wrestler"] = 4100, ["Infobox_professional_wrestling_event"] = 2400, ["Infobox_protected_area"] = 14000, ["Infobox_protein_family"] = 2100, ["Infobox_publisher"] = 2300, ["Infobox_racehorse"] = 5400, ["Infobox_racing_driver"] = 3400, ["Infobox_radio_station"] = 22000, ["Infobox_rail"] = 2800, ["Infobox_rail_line"] = 6900, ["Infobox_rail_line/tracking"] = 6900, ["Infobox_rail_service"] = 2800, ["Infobox_rail_service/doc"] = 2800, ["Infobox_reality_competition_season"] = 3100, ["Infobox_record_label"] = 4000, ["Infobox_recurring_event"] = 6000, ["Infobox_religious_biography"] = 4700, ["Infobox_religious_building"] = 11000, ["Infobox_religious_building/color"] = 16000, ["Infobox_restaurant"] = 2000, ["Infobox_river"] = 29000, ["Infobox_river/calcunit"] = 29000, ["Infobox_river/discharge"] = 29000, ["Infobox_river/row-style"] = 29000, ["Infobox_river/source"] = 29000, ["Infobox_road"] = 24000, ["Infobox_road/banner"] = 13000, ["Infobox_road/hide/cities"] = 2200, ["Infobox_road/meta/errors"] = 24000, ["Infobox_road/meta/mask/category"] = 24000, ["Infobox_road/meta/mask/country"] = 24000, ["Infobox_road/meta/mask/subtype1"] = 13000, ["Infobox_road/meta/mask/subtype2"] = 12000, ["Infobox_road/name/USA"] = 13000, ["Infobox_road/name/USA/StateName"] = 5300, ["Infobox_road/shield/USA"] = 13000, ["Infobox_road/shieldmain/USA"] = 13000, ["Infobox_road/styles.css"] = 25000, ["Infobox_road_small"] = 2200, ["Infobox_rockunit"] = 6400, ["Infobox_royalty"] = 20000, ["Infobox_royalty/short_description"] = 13000, ["Infobox_rugby_biography"] = 15000, ["Infobox_rugby_biography/correct_date"] = 15000, ["Infobox_rugby_biography/depcheck"] = 6700, ["Infobox_rugby_league_biography"] = 9500, ["Infobox_rugby_league_biography/PLAYER"] = 9400, ["Infobox_rugby_team"] = 2600, ["Infobox_sailboat_specifications"] = 2000, ["Infobox_saint"] = 4800, ["Infobox_school"] = 38000, ["Infobox_school/short_description"] = 38000, ["Infobox_school_district"] = 5600, ["Infobox_school_district/styles.css"] = 5600, ["Infobox_scientist"] = 45000, ["Infobox_service_record"] = 2600, ["Infobox_settlement"] = 547000, ["Infobox_settlement/areadisp"] = 228000, ["Infobox_settlement/columns"] = 90000, ["Infobox_settlement/columns/styles.css"] = 90000, ["Infobox_settlement/densdisp"] = 416000, ["Infobox_settlement/impus"] = 80000, ["Infobox_settlement/lengthdisp"] = 165000, ["Infobox_settlement/link"] = 90000, ["Infobox_settlement/metric"] = 203000, ["Infobox_settlement/pref"] = 283000, ["Infobox_settlement/styles.css"] = 547000, ["Infobox_ship_begin"] = 40000, ["Infobox_ship_career"] = 36000, ["Infobox_ship_characteristics"] = 40000, ["Infobox_ship_class_overview"] = 4000, ["Infobox_ship_image"] = 39000, ["Infobox_shopping_mall"] = 3300, ["Infobox_short_story"] = 2200, ["Infobox_skier"] = 2600, ["Infobox_soap_character"] = 2900, ["Infobox_software"] = 14000, ["Infobox_software/simple"] = 14000, ["Infobox_song"] = 73000, ["Infobox_song/color"] = 73000, ["Infobox_song/link"] = 73000, ["Infobox_spaceflight"] = 3500, ["Infobox_spaceflight/styles.css"] = 3500, ["Infobox_sports_competition_event"] = 14000, ["Infobox_sports_competition_event/medalrow"] = 9200, ["Infobox_sports_league"] = 4800, ["Infobox_sports_season"] = 4600, ["Infobox_sports_team"] = 2300, ["Infobox_sportsperson"] = 104000, ["Infobox_stadium"] = 3900, ["Infobox_station"] = 54000, ["Infobox_station/doc"] = 54000, ["Infobox_station/services"] = 54000, ["Infobox_station/styles.css"] = 54000, ["Infobox_street"] = 3100, ["Infobox_swimmer"] = 9300, ["Infobox_television"] = 54000, ["Infobox_television_channel"] = 6200, ["Infobox_television_episode"] = 11000, ["Infobox_television_episode/styles.css"] = 11000, ["Infobox_television_season"] = 8900, ["Infobox_television_station"] = 3600, ["Infobox_tennis_biography"] = 9500, ["Infobox_tennis_event"] = 2200, ["Infobox_tennis_tournament_event"] = 17000, ["Infobox_tennis_tournament_year"] = 8600, ["Infobox_tennis_tournament_year/color"] = 26000, ["Infobox_tennis_tournament_year/footer"] = 26000, ["Infobox_train"] = 2200, ["Infobox_tropical_cyclone"] = 2200, ["Infobox_union"] = 2200, ["Infobox_university"] = 26000, ["Infobox_user"] = 2600, ["Infobox_venue"] = 17000, ["Infobox_video_game"] = 27000, ["Infobox_volleyball_biography"] = 5100, ["Infobox_weapon"] = 7100, ["Infobox_website"] = 7600, ["Infobox_writer"] = 36000, ["Information"] = 110000, ["Information/styles.css"] = 110000, ["Input_link"] = 33000, ["Instagram"] = 9000, ["Interlanguage_link"] = 130000, ["Interlanguage_link_multi"] = 20000, ["Internet_Archive_author"] = 18000, ["Internet_Archive_film"] = 2400, ["Intitle"] = 11000, ["Invalid_SVG"] = 3900, ["Invalid_SVG/styles.css"] = 3900, ["Ipsock"] = 12000, ["Iptalk"] = 22000, ["IranCensus2006"] = 54000, ["IranNCSGN"] = 3300, ["Iran_Census_2006"] = 54000, ["Irc"] = 2100, ["Irish_place_name"] = 2500, ["IsValidPageName"] = 127000, ["Is_country_in_Central_America"] = 13000, ["Is_country_in_the_Caribbean"] = 13000, ["Is_interwiki_link"] = 6000, ["Is_italic_taxon"] = 426000, ["Isbn"] = 5900, ["Isfdb_name"] = 4000, ["Isfdb_title"] = 4400, ["Isnumeric"] = 194000, ["Iso2continent"] = 28000, ["Iso2country"] = 22000, ["Iso2country/article"] = 22000, ["Iso2country/data"] = 22000, ["Iso2nationality"] = 65000, ["Issubst"] = 78000, ["Isu_name"] = 2200, ["Italic_dab2"] = 5000, ["Italic_title"] = 759000, ["Italic_title_prefixed"] = 8600, ["Italics_colon"] = 3100, ["Italictitle"] = 4600, ["Ivm"] = 5800, ["Ivm/styles.css"] = 5800, ["Ivmbox"] = 119000, ["Ivory_messagebox"] = 129000, ["Module:I18n/complex_date"] = 67000, ["Module:IP"] = 110000, ["Module:IPA_symbol"] = 4200, ["Module:IPA_symbol/data"] = 4200, ["Module:IPAc-en"] = 45000, ["Module:IPAc-en/data"] = 45000, ["Module:IPAc-en/phonemes"] = 45000, ["Module:IPAc-en/pronunciation"] = 45000, ["Module:IPAddress"] = 132000, ["Module:ISO_3166"] = 710000, ["Module:ISO_3166/data/AT"] = 2500, ["Module:ISO_3166/data/BA"] = 3400, ["Module:ISO_3166/data/CA"] = 2600, ["Module:ISO_3166/data/DE"] = 14000, ["Module:ISO_3166/data/ES"] = 3500, ["Module:ISO_3166/data/FR"] = 38000, ["Module:ISO_3166/data/GB"] = 6300, ["Module:ISO_3166/data/GR"] = 3000, ["Module:ISO_3166/data/IN"] = 28000, ["Module:ISO_3166/data/National"] = 710000, ["Module:ISO_3166/data/RS"] = 3200, ["Module:ISO_3166/data/RU"] = 24000, ["Module:ISO_3166/data/TR"] = 2300, ["Module:ISO_3166/data/US"] = 83000, ["Module:ISO_639_name"] = 13000, ["Module:ISOdate"] = 67000, ["Module:Icon"] = 546000, ["Module:Icon/data"] = 546000, ["Module:If_empty"] = 2860000, ["Module:If_in_page"] = 7300, ["Module:If_preview"] = 450000, ["Module:If_preview/configuration"] = 450000, ["Module:If_preview/styles.css"] = 450000, ["Module:Import_style"] = 12000, ["Module:In_lang"] = 342000, ["Module:Indent"] = 3900, ["Module:Infobox"] = 3910000, ["Module:Infobox/dates"] = 63000, ["Module:Infobox/styles.css"] = 4170000, ["Module:Infobox3cols"] = 290000, ["Module:InfoboxImage"] = 4200000, ["Module:Infobox_body_of_water_tracking"] = 17000, ["Module:Infobox_cyclist_tracking"] = 16000, ["Module:Infobox_gene"] = 13000, ["Module:Infobox_mapframe"] = 365000, ["Module:Infobox_military_conflict"] = 20000, ["Module:Infobox_military_conflict/styles.css"] = 20000, ["Module:Infobox_multi-lingual_name"] = 18000, ["Module:Infobox_multi-lingual_name/data"] = 18000, ["Module:Infobox_power_station"] = 2900, ["Module:Infobox_road"] = 25000, ["Module:Infobox_road/browselinks"] = 25000, ["Module:Infobox_road/length"] = 25000, ["Module:Infobox_road/locations"] = 24000, ["Module:Infobox_road/map"] = 25000, ["Module:Infobox_road/route"] = 25000, ["Module:Infobox_road/sections"] = 24000, ["Module:Infobox_television"] = 54000, ["Module:Infobox_television_disambiguation_check"] = 61000, ["Module:Infobox_television_episode"] = 11000, ["Module:Infobox_television_season_disambiguation_check"] = 8400, ["Module:Infobox_television_season_name"] = 8900, ["Module:Internet_Archive"] = 18000, ["Module:IrelandByCountyCatNav"] = 2500, ["Module:Is_infobox_in_lead"] = 370000, ["Module:Is_instance"] = 2400, ["Module:Italic_title"] = 1070000, ["Module:Italic_title2"] = 5000, } 264b4ea90fb01775a9d1617d67df8fa1e9815ba7 Module:Uses TemplateStyles 828 116 291 290 2022-08-01T10:56:54Z 17ademoladav 2 1 revision imported Scribunto text/plain local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local TNT = require('Module:TNT') local p = {} local function format(msg, ...) return TNT.format('I18n/Uses TemplateStyles', msg, ...) end local function getConfig() return mw.loadData('Module:Uses TemplateStyles/config') end local function renderBox(tStyles) local boxArgs = { type = 'notice', small = true, image = string.format('[[File:Farm-Fresh css add.svg|32px|alt=%s]]', format('logo-alt')) } if #tStyles < 1 then boxArgs.text = string.format('<strong class="error">%s</strong>', format('error-emptylist')) else local cfg = getConfig() local tStylesLinks = {} for i, ts in ipairs(tStyles) do local link = string.format('[[:%s]]', ts) local sandboxLink = nil local tsTitle = mw.title.new(ts) if tsTitle and cfg['sandbox_title'] then local tsSandboxTitle = mw.title.new(string.format( '%s:%s/%s/%s', tsTitle.nsText, tsTitle.baseText, cfg['sandbox_title'], tsTitle.subpageText)) if tsSandboxTitle and tsSandboxTitle.exists then sandboxLink = format('sandboxlink', link, ':' .. tsSandboxTitle.prefixedText) end end tStylesLinks[i] = sandboxLink or link end local tStylesList = mList.makeList('bulleted', tStylesLinks) boxArgs.text = format( mw.title.getCurrentTitle():inNamespaces(828,829) and 'header-module' or 'header-template') .. '\n' .. tStylesList end return mMessageBox.main('mbox', boxArgs) end local function renderTrackingCategories(args, tStyles, titleObj) if yesno(args.nocat) then return '' end local cfg = getConfig() local cats = {} -- Error category if #tStyles < 1 and cfg['error_category'] then cats[#cats + 1] = cfg['error_category'] end -- TemplateStyles category titleObj = titleObj or mw.title.getCurrentTitle() if (titleObj.namespace == 10 or titleObj.namespace == 828) and not cfg['subpage_blacklist'][titleObj.subpageText] then local category = args.category or cfg['default_category'] if category then cats[#cats + 1] = category end if not yesno(args.noprotcat) and (cfg['protection_conflict_category'] or cfg['padlock_pattern']) then local currentProt = titleObj.protectionLevels["edit"] and titleObj.protectionLevels["edit"][1] or nil local addedLevelCat = false local addedPadlockCat = false for i, ts in ipairs(tStyles) do local tsTitleObj = mw.title.new(ts) local tsProt = tsTitleObj.protectionLevels["edit"] and tsTitleObj.protectionLevels["edit"][1] or nil if cfg['padlock_pattern'] and tsProt and not addedPadlockCat then local content = tsTitleObj:getContent() if not content:find(cfg['padlock_pattern']) then cats[#cats + 1] = cfg['missing_padlock_category'] addedPadlockCat = true end end if cfg['protection_conflict_category'] and currentProt and tsProt ~= currentProt and not addedLevelCat then currentProt = cfg['protection_hierarchy'][currentProt] or 0 tsProt = cfg['protection_hierarchy'][tsProt] or 0 if tsProt < currentProt then addedLevelCat = true cats[#cats + 1] = cfg['protection_conflict_category'] end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end function p._main(args, cfg) local tStyles = mTableTools.compressSparseArray(args) local box = renderBox(tStyles) local trackingCategories = renderTrackingCategories(args, tStyles) return box .. trackingCategories end function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end return p 71ca57c37849f38e3c5ee30061bdae730963e48e Module:Uses TemplateStyles/config 828 117 293 292 2022-08-01T10:56:54Z 17ademoladav 2 1 revision imported Scribunto text/plain local cfg = {} -- Don’t touch this line. -- Subpage blacklist: these subpages will not be categorized (except for the -- error category, which is always added if there is an error). -- For example “Template:Foo/doc” matches the `doc = true` rule, so it will have -- no categories. “Template:Foo” and “Template:Foo/documentation” match no rules, -- so they *will* have categories. All rules should be in the -- ['<subpage name>'] = true, -- format. cfg['subpage_blacklist'] = { ['doc'] = true, ['sandbox'] = true, ['sandbox2'] = true, ['testcases'] = true, } -- Sandbox title: if the stylesheet’s title is <template>/<stylesheet>.css, the -- stylesheet’s sandbox is expected to be at <template>/<sandbox_title>/<stylesheet>.css -- Set to nil to disable sandbox links. cfg['sandbox_title'] = 'sandbox' -- Error category: this category is added if the module call contains errors -- (e.g. no stylesheet listed). A category name without namespace, or nil -- to disable categorization (not recommended). cfg['error_category'] = 'Uses TemplateStyles templates with errors' -- Default category: this category is added if no custom category is specified -- in module/template call. A category name without namespace, or nil -- to disable categorization. cfg['default_category'] = 'Templates using TemplateStyles' -- Protection conflict category: this category is added if the protection level -- of any stylesheet is lower than the protection level of the template. A category name -- without namespace, or nil to disable categorization (not recommended). cfg['protection_conflict_category'] = 'Templates using TemplateStyles with a different protection level' -- Hierarchy of protection levels, used to determine whether one protection level is lower -- than another and thus should populate protection_conflict_category. No protection is treated as zero cfg['protection_hierarchy'] = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } -- Padlock pattern: Lua pattern to search on protected stylesheets for, or nil -- to disable padlock check. cfg['padlock_pattern'] = '{{pp-' -- Missing padlock category: this category is added if a protected stylesheet -- doesn’t contain any padlock template (specified by the above Lua pattern). -- A category name without namespace (no nil allowed) if the pattern is not nil, -- unused (and thus may be nil) otherwise. cfg['missing_padlock_category'] = 'Templates using TemplateStyles without padlocks' return cfg -- Don’t touch this line. 58e7a37c44f6ea3f6b8af54a559d696cc7256493 Template:DMCA 10 118 295 294 2022-08-01T10:56:55Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{Dated maintenance category |onlyarticles=yes |1={{{1|}}} |2={{{2|}}} |3={{{3|}}} |4={{{4|}}} |5={{{5|}}} }}<noinclude> {{documentation|Template:Dated maintenance category/doc}} </noinclude> 6bbc57c75cc28708a0e71dd658224d5945d80d68 Template:Dated maintenance category 10 119 297 296 2022-08-01T10:56:55Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <nowiki/><!--This nowiki helps to prevent whitespace at the top of articles-->{{#ifeq:{{FULLROOTPAGENAME}}|Wikipedia:Template messages|<!--Do not categorize-->|<!-- -->{{#ifexpr:{{#if:{{NAMESPACE}}|0|1}}+{{#ifeq:{{{onlyarticles|no}}}|yes|0|1}} |{{#if:{{{3|}}} |[[Category:{{{1}}} {{{2}}} {{{3}}}]]<!-- -->{{#ifexist:Category:{{{1}}} {{{2}}} {{{3}}} |<!-- -->|[[Category:Articles with invalid date parameter in template]]<!-- -->}} |[[Category:{{#if:{{{5|}}} |{{{5}}}<!-- -->|{{{1}}}<!-- -->}}]]<!-- -->}}{{#if:{{{4|}}} |[[Category:{{{4}}}]]}}<!-- -->}}<!-- -->}}<noinclude> {{documentation}} </noinclude> 41e7d4000124d4f718ddf222af0b72825048c4c4 Template:FULLROOTPAGENAME 10 120 299 298 2022-08-01T10:56:56Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{ safesubst:<noinclude/>#if: {{ safesubst:<noinclude/>Ns has subpages | {{ safesubst:<noinclude/>#if:{{{1|}}}|{{ safesubst:<noinclude/>NAMESPACE:{{{1}}}}}|{{ safesubst:<noinclude/>NAMESPACE}}}} }} | {{ safesubst:<noinclude/>#titleparts:{{ safesubst:<noinclude/>#if:{{{1|}}}|{{{1}}}|{{ safesubst:<noinclude/>FULLPAGENAME}}}}|1}} | {{ safesubst:<noinclude/>#if:{{{1|}}}|{{{1}}}|{{ safesubst:<noinclude/>FULLPAGENAME}}}} }}<noinclude> {{documentation}} </noinclude> fd0c4e7050dded2d50e5df405e6e5e31dd0d46ac Template:Ns has subpages 10 121 301 300 2022-08-01T10:56:56Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:Ns has subpages|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 060d2d01af26cb67fd90a7c346a0d2d5e450a040 Template:Use dmy dates 10 122 303 302 2022-08-01T10:56:57Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{ <includeonly>safesubst:</includeonly>#invoke:Unsubst||date=__DATE__ |$B= {{DMCA|Use dmy dates|from|{{{date|}}}}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using Use dmy dates template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Use dmy dates]] with unknown parameter "_VALUE_"|ignoreblank=y| cs1-dates | date }}}}<noinclude>{{documentation}}</noinclude> 3a087cd27e88fd70a0765c62d5ab506c3b73c9e7 Template:Used in system 10 123 305 304 2022-08-01T10:56:58Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#invoke:High-use|main|1=|2={{{2|}}}|system={{#if:{{{1|}}}|{{{1}}}|in system messages}}<noinclude>|nocat=true</noinclude>}}<noinclude> {{documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 0abe278369db6cbbe319e7452d7644e27e11c532 Module:InfoboxImage/doc 828 124 307 306 2022-08-01T10:57:09Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{used in system}} {{Module rating|protected}} ==Overview== This module is used within infoboxes to process the image parameters and tidy up the formatting of the result. ==Parameters== {| class="wikitable" ! Parameter ! Description |- | image | Required. The main parameter that should be passed over which contains the image info. |- | size | Size to display image. |- | maxsize | Maximum size to display image. Note: If no size or sizedefault params specified then image will be shown at maxsize. |- | sizedefault | The size to use for the image if no size param is specified. Defaults to [[Wikipedia:Autosizing images|frameless]]. |- | alt | Alt text for the image. |- | title | Title text for image (mouseover text). |- | border | If yes, then a border is added. |- | page | The page number to be displayed when using a multi-page image. |- | upright | If upright=yes, adds "upright" which displays image at 75% of default image size (which is 220px if not changed at [[Special:Preferences]]). If a value, adds "upright=''value''" to image, where values less than 1 scale the image down (0.9 = 90%) and values greater than 1 scale the image up (1.15 = 115%). |- | center | If yes, then the image is centered. |- | thumbtime | thumbtime param, used for video clips. |- | suppressplaceholder | If no, then will not suppress certain placeholder images. See {{section link||Placeholder images which can be suppressed}}. |- | link | Page to go to when clicking on the image. |- | class | HTML classes to add to the image. |} Note: If you specify the maxsize or sizedefault params, then you should include the px after the number. {{Use dmy dates|date=July 2016}} ==Parameters displayed in image syntax== All parameters: :<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size={{{size}}} | maxsize={{{maxsize}}} | sizedefault={{{sizedefault}}} | upright={{{upright}}} | alt={{{alt}}} | title={{{title}}} | thumbtime={{{thumbtime}}} | link={{{link}}} | border=yes | center=yes | page={{{page}}} | class={{{class}}} }}</pre> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size={{{size}}} | maxsize={{{maxsize}}} | sizedefault={{{sizedefault}}} | upright={{{upright}}} | alt={{{alt}}} | title={{{title}}} | thumbtime={{{thumbtime}}} | link={{{link}}} | border=yes | center=yes | page={{{page}}} | class={{{class}}}}}</code> When "size" and "maxsize" are defined, the smaller of the two is used (if "px" is omitted it will be added by the module): :<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size=300px | maxsize=250px }}</pre> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size=300px | maxsize=250px }}</code> When "size" is not defined, "sizedefault" is used, even if larger than "maxsize" (in actual use "px" is required after the number; omitted here to show it is not added by the module): :<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | sizedefault=250px | maxsize=200px }}</pre> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | sizedefault=250px | maxsize=200px }}</code> When "size" and "sizedefault" are not defined, "maxsize" is used (in actual use "px" is required after the number; omitted here to show it is not added by the module): :<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | maxsize=250px }}</pre> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | maxsize=250px }}</code> When "size", "sizedefault", and "maxsize" are not defined, "frameless" is added, which displays the image at the default thumbnail size (220px, but logged in users can change this at [[Special:Preferences]]) and is required if using "upright" to scale the default size: :<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} }}</pre> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} }}</code> Use of "upright" without a number value, which displays the image at approximately 75% of the user's default size (multiplied by 0.75 then rounded to nearest 10): :<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | upright = yes }}</pre> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | upright = yes }}</code> When "alt" is used without "title", the alt text is also used as the title: :<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | alt = Alt text }}</pre> :<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | alt = Alt text }}</code> For more information, see [[Wikipedia:Extended image syntax]]. ==Sample usage== <pre style="overflow:auto;"> |image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|upright={{{image_upright|1}}}|alt={{{alt|}}}}} </pre> ==Examples== {| class="wikitable" |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg}}</nowiki><br /> <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=File:Abbey Rd Studios.jpg}}</nowiki><br /> <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Image:Abbey Rd Studios.jpg}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|upright=yes}}</nowiki><br /> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|upright=yes}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|upright=1.2}}</nowiki><br /> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|upright=1.2}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100px}}</nowiki><br /> <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100px}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=[[Image:Abbey Rd Studios.jpg|200px]]}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=[[Image:Abbey Rd Studios.jpg|200px]]}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=[[Image:Abbey Rd Studios.jpg|200px]]|title=Abbey Road!}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=[[Image:Abbey Rd Studios.jpg|200px]]|title=Abbey Road!}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250|alt=The front stairs and door of Abbey Road Studios}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250|alt=The front stairs and door of Abbey Road Studios}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios|title=Exterior, front view of Abbey Road studios}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios|title=Exterior, front view of Abbey Road studios}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|alt=The front stairs and door of Abbey Road Studios}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|alt=The front stairs and door of Abbey Road Studios}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100px|alt=The front stairs and door of Abbey Road Studios}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100px|alt=The front stairs and door of Abbey Road Studios}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Bandera de Bilbao.svg|size=100|border=yes}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Bandera de Bilbao.svg|size=200|border=yes}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Image is needed male.svg}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Image is needed male.svg}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Image is needed male.svg|suppressplaceholder=no}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Image is needed male.svg|suppressplaceholder=no}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=[[File:Image is needed male.svg|200px]]}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=[[File:Image is needed male.svg|200px]]}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=[[File:Image is needed male.svg|200px]]|suppressplaceholder=no}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=[[File:Image is needed male.svg|200px]]|suppressplaceholder=no}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=50px|maxsize=100px}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=50px|maxsize=100px}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=200px|maxsize=100px}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=200px|maxsize=100px}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=[[File:Abbey Rd Studios.jpg|200px]]|maxsize=100px}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=[[File:Abbey Rd Studios.jpg|200px]]|maxsize=100px}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|maxsize=100px|center=yes}}</nowiki> | {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|maxsize=100px|center=yes}} |- | <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=no such image|maxsize=100px|center=yes}}</nowiki><!-- this issue sh'd be fixed somewhow--> | {{#invoke:InfoboxImage|InfoboxImage|image=no such image|maxsize=100px|center=yes}} |} == Placeholder images which can be suppressed == {| | style="vertical-align:top;" | * [[:File:Blue - replace this image female.svg]] * [[:File:Blue - replace this image male.svg]] * [[:File:Female no free image yet.png]] * [[:File:Male no free image yet.png]] * [[:File:Flag of None (square).svg]] * [[:File:Flag of None.svg]] * [[:File:Flag of.svg]] * [[:File:Green - replace this image female.svg]] * [[:File:Green - replace this image male.svg]] * [[:File:Image is needed female.svg]] * [[:File:Image is needed male.svg]] * [[:File:Location map of None.svg]] * [[:File:Male no free image yet.png]] * [[:File:Missing flag.png]] * [[:File:No flag.svg]] * [[:File:No free portrait.svg]] * [[:File:No portrait (female).svg]] * [[:File:No portrait (male).svg]] * [[:File:Red - replace this image female.svg]] * [[:File:Red - replace this image male.svg]] * [[:File:Replace this image female (blue).svg]] * [[:File:Replace this image female.svg]] * [[:File:Replace this image male (blue).svg]] * [[:File:Replace this image male.svg]] * [[:File:Silver - replace this image female.svg]] * [[:File:Silver - replace this image male.svg]] * [[:File:Replace this image.svg]] * [[:File:Cricket no pic.png]] * [[:File:CarersLogo.gif]] * [[:File:Diagram Needed.svg]] * [[:File:Example.jpg]] * [[:File:Image placeholder.png]] * [[:File:No male portrait.svg]] * [[:File:Nocover-upload.png]] * [[:File:NoDVDcover copy.png]] * [[:File:Noribbon.svg]] | style="vertical-align:top;" | * [[:File:No portrait-BFD-test.svg]] * [[:File:Placeholder barnstar ribbon.png]] * [[:File:Project Trains no image.png]] * [[:File:Image-request.png]] * [[:File:Sin bandera.svg]] * [[:File:Sin escudo.svg]] * [[:File:Replace this image - temple.png]] * [[:File:Replace this image butterfly.png]] * [[:File:Replace this image.svg]] * [[:File:Replace this image1.svg]] * [[:File:Resolution angle.png]] * [[:File:Image-No portrait-text-BFD-test.svg]] * [[:File:Insert image here.svg]] * [[:File:No image available.png]] * [[:File:NO IMAGE YET square.png]] * [[:File:NO IMAGE YET.png]] * [[:File:No Photo Available.svg]] * [[:File:No Screenshot.svg]] * [[:File:No-image-available.jpg]] * [[:File:Null.png]] * [[:File:PictureNeeded.gif]] * [[:File:Place holder.jpg]] * [[:File:Unbenannt.JPG]] * [[:File:UploadACopyrightFreeImage.svg]] * [[:File:UploadAnImage.gif]] * [[:File:UploadAnImage.svg]] * [[:File:UploadAnImageShort.svg]] * [[:File:CarersLogo.gif]] * [[:File:Diagram Needed.svg]] * [[:File:No male portrait.svg]] * [[:File:NoDVDcover copy.png]] * [[:File:Placeholder barnstar ribbon.png]] * [[:File:Project Trains no image.png]] * [[:File:Image-request.png]] |} == Tracking categories == * {{clc|Pages using infoboxes with thumbnail images}} <includeonly>{{Sandbox other|| {{DEFAULTSORT:Image, {{PAGENAME}}}} [[Category:Modules for image handling]] [[Category:Modules that add a tracking category]] [[Category:Infobox modules]] }}</includeonly> 0222bb0296d46855530b9cacd464c3cdf2e987c3 Module:Ns has subpages 828 125 309 308 2022-08-01T10:57:10Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module implements [[Template:Ns has subpages]]. -- While the template is fairly simple, this information is made available to -- Lua directly, so using a module means that we don't have to update the -- template as new namespaces are added. local p = {} function p._main(ns, frame) -- Get the current namespace if we were not passed one. if not ns then ns = mw.title.getCurrentTitle().namespace end -- Look up the namespace table from mw.site.namespaces. This should work -- for a majority of cases. local nsTable = mw.site.namespaces[ns] -- Try using string matching to get the namespace from page names. -- Do a quick and dirty bad title check to try and make sure we do the same -- thing as {{NAMESPACE}} in most cases. if not nsTable and type(ns) == 'string' and not ns:find('[<>|%[%]{}]') then local nsStripped = ns:gsub('^[_%s]*:', '') nsStripped = nsStripped:gsub(':.*$', '') nsTable = mw.site.namespaces[nsStripped] end -- If we still have no match then try the {{NAMESPACE}} parser function, -- which should catch the remainder of cases. Don't use a mw.title object, -- as this would increment the expensive function count for each new page -- tested. if not nsTable then frame = frame or mw.getCurrentFrame() local nsProcessed = frame:callParserFunction('NAMESPACE', ns) nsTable = nsProcessed and mw.site.namespaces[nsProcessed] end return nsTable and nsTable.hasSubpages end function p.main(frame) local ns = frame:getParent().args[1] if ns then ns = ns:match('^%s*(.-)%s*$') -- trim whitespace ns = tonumber(ns) or ns end local hasSubpages = p._main(ns, frame) return hasSubpages and 'yes' or '' end return p e133068ba73738b16e1e3eba47735516a461eb5b Module:Unsubst 828 126 311 310 2022-08-01T10:57:10Z 17ademoladav 2 1 revision imported Scribunto text/plain local checkType = require('libraryUtil').checkType local p = {} local BODY_PARAM = '$B' local specialParams = { ['$params'] = 'parameter list', ['$aliases'] = 'parameter aliases', ['$flags'] = 'flags', ['$B'] = 'template content', ['$template-name'] = 'template invocation name override', } function p.main(frame, body) -- If we are substing, this function returns a template invocation, and if -- not, it returns the template body. The template body can be specified in -- the body parameter, or in the template parameter defined in the -- BODY_PARAM variable. This function can be called from Lua or from -- #invoke. -- Return the template body if we aren't substing. if not mw.isSubsting() then if body ~= nil then return body elseif frame.args[BODY_PARAM] ~= nil then return frame.args[BODY_PARAM] else error(string.format( "no template content specified (use parameter '%s' from #invoke)", BODY_PARAM ), 2) end end -- Sanity check for the frame object. if type(frame) ~= 'table' or type(frame.getParent) ~= 'function' or not frame:getParent() then error( "argument #1 to 'main' must be a frame object with a parent " .. "frame available", 2 ) end -- Find the invocation name. local mTemplateInvocation = require('Module:Template invocation') local name if frame.args['$template-name'] and '' ~= frame.args['$template-name'] then name = frame.args['$template-name'] -- override whatever the template name is with this name else name = mTemplateInvocation.name(frame:getParent():getTitle()) end -- Combine passed args with passed defaults local args = {} if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*override%s*,' ) then for k, v in pairs( frame:getParent().args ) do args[k] = v end for k, v in pairs( frame.args ) do if not specialParams[k] then if v == '__DATE__' then v = mw.getContentLanguage():formatDate( 'F Y' ) end args[k] = v end end else for k, v in pairs( frame.args ) do if not specialParams[k] then if v == '__DATE__' then v = mw.getContentLanguage():formatDate( 'F Y' ) end args[k] = v end end for k, v in pairs( frame:getParent().args ) do args[k] = v end end -- Trim parameters, if not specified otherwise if not string.find( ','..(frame.args['$flags'] or '')..',', ',%s*keep%-whitespace%s*,' ) then for k, v in pairs( args ) do args[k] = mw.ustring.match(v, '^%s*(.*)%s*$') or '' end end -- Pull information from parameter aliases local aliases = {} if frame.args['$aliases'] then local list = mw.text.split( frame.args['$aliases'], '%s*,%s*' ) for k, v in ipairs( list ) do local tmp = mw.text.split( v, '%s*>%s*' ) aliases[tonumber(mw.ustring.match(tmp[1], '^[1-9][0-9]*$')) or tmp[1]] = ((tonumber(mw.ustring.match(tmp[2], '^[1-9][0-9]*$'))) or tmp[2]) end end for k, v in pairs( aliases ) do if args[k] and ( not args[v] or args[v] == '' ) then args[v] = args[k] end args[k] = nil end -- Remove empty parameters, if specified if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*remove%-empty%s*,' ) then local tmp = 0 for k, v in ipairs( args ) do if v ~= '' or ( args[k+1] and args[k+1] ~= '' ) or ( args[k+2] and args[k+2] ~= '' ) then tmp = k else break end end for k, v in pairs( args ) do if v == '' then if not (type(k) == 'number' and k < tmp) then args[k] = nil end end end end -- Order parameters if frame.args['$params'] then local params, tmp = mw.text.split( frame.args['$params'], '%s*,%s*' ), {} for k, v in ipairs(params) do v = tonumber(mw.ustring.match(v, '^[1-9][0-9]*$')) or v if args[v] then tmp[v], args[v] = args[v], nil end end for k, v in pairs(args) do tmp[k], args[k] = args[k], nil end args = tmp end return mTemplateInvocation.invocation(name, args) end p[''] = p.main -- For backwards compatibility return p 7f01ffc8aa2ac4a4772f14c12e0b77e384ecabb6 Module:Check for unknown parameters/doc 828 127 313 312 2022-08-01T10:57:11Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{used in system|in [[MediaWiki:Abusefilter-warning-DS]]}} {{module rating|p}} {{Lua|Module:If preview|noprotcat=yes}} This module may be appended to a template to check for uses of unknown parameters. == Usage == === Basic usage === <pre> {{#invoke:check for unknown parameters|check |unknown=[[Category:Some tracking category]] |arg1|arg2|arg3|argN}} </pre> or to sort the entries in the tracking category by parameter with a preview error message <pre> {{#invoke:check for unknown parameters|check |unknown=[[Category:Some tracking category|_VALUE_]] |preview=unknown parameter "_VALUE_" |arg1|arg2|...|argN}} </pre> or for an explicit red error message <pre> {{#invoke:check for unknown parameters|check |unknown=<span class="error">Sorry, I don't recognize _VALUE_</span> |arg1|arg2|...|argN}} </pre> Here, <code>arg1</code>, <code>arg2</code>, ..., <code>argN</code>, are the known parameters. Unnamed (positional) parameters can be added too: <code><nowiki>|1|2|argname1|argname2|...</nowiki></code>. Any parameter which is used, but not on this list, will cause the module to return whatever is passed with the <code>unknown</code> parameter. The <code>_VALUE_</code> keyword, if used, will be changed to the name of the parameter. This is useful for either sorting the entries in a tracking category, or for provide more explicit information. By default, the module makes no distinction between a defined-but-blank parameter and a non-blank parameter. That is, both unlisted {{para|foo|x}} and {{para|foo}} are reported. To only track non-blank parameters use {{para|ignoreblank|1}}. By default, the module ignores blank positional parameters. That is, an unlisted {{para|2}} is ignored. To ''include'' blank positional parameters in the tracking use {{para|showblankpositional|1}}. === Lua patterns === This module supports [[:mw:Extension:Scribunto/Lua reference manual#Patterns|Lua patterns]] (similar to [[regular expression]]s), which are useful when there are many known parameters which use a systematic pattern. For example, [[template:infobox3cols]] uses <pre> | regexp1 = header[%d][%d]* | regexp2 = label[%d][%d]* | regexp3 = data[%d][%d]*[abc]? | regexp4 = class[%d][%d]*[abc]? | regexp5 = rowclass[%d][%d]* | regexp6 = rowstyle[%d][%d]* | regexp7 = rowcellstyle[%d][%d]* </pre> to match all parameters of the form <code>headerNUM</code>, <code>labelNUM</code>, <code>dataNUM</code>, <code>dataNUMa</code>, <code>dataNUMb</code>, <code>dataNUMc</code>, ..., <code>rowcellstyleNUM</code>, where NUM is a string of digits. == Example == <pre> {{Infobox | above = {{{name|}}} | label1 = Height | data1 = {{{height|}}} | label2 = Weight | data2 = {{{weight|}}} | label3 = Website | data3 = {{{website|}}} }}<!-- end infobox, start tracking -->{{#invoke:Check for unknown parameters|check | unknown = {{main other|[[Category:Some tracking category|_VALUE_]]}} | preview = unknown parameter "_VALUE_" | name | height | weight | website }} </pre> ==See also== * {{clc|Unknown parameters}} (category page can have header {{tl|Unknown parameters category}}) * [[Module:Check for deprecated parameters]] – similar module that checks for deprecated parameters * [[Module:Check for clobbered parameters]] – module that checks for conflicting parameters * [[Module:TemplatePar]] – similar function (originally from dewiki) * [[Template:Parameters]] and [[Module:Parameters]] – generates a list of parameter names for a given template * [[Project:TemplateData]] based template parameter validation * [[Module:Parameter validation]] checks a lot more * [[User:Bamyers99/TemplateParametersTool]] - A tool for checking usage of template parameters <includeonly>{{sandbox other|| <!-- Categories go here and interwikis go in Wikidata. --> [[Category:Modules that add a tracking category]] }}</includeonly> 31dae7f38272fceeee327160df2aae7df2c99fb0 Module:Transclusion count/data/C 828 128 315 314 2022-08-01T10:57:11Z 17ademoladav 2 1 revision imported Scribunto text/plain return { ["C"] = 598000, ["C-Class"] = 76000, ["C-SPAN"] = 12000, ["C-cmn"] = 2500, ["C-pl"] = 52000, ["C."] = 2400, ["CAN"] = 20000, ["CANelec"] = 13000, ["CANelec/gain"] = 2500, ["CANelec/hold"] = 4500, ["CANelec/source"] = 6500, ["CANelec/top"] = 5600, ["CANelec/total"] = 5700, ["CAS"] = 3800, ["CBB_Standings_End"] = 14000, ["CBB_Standings_Entry"] = 14000, ["CBB_Standings_Start"] = 14000, ["CBB_Yearly_Record_End"] = 2800, ["CBB_Yearly_Record_Entry"] = 2900, ["CBB_Yearly_Record_Start"] = 2800, ["CBB_Yearly_Record_Subhead"] = 3400, ["CBB_Yearly_Record_Subtotal"] = 2700, ["CBB_roster/Footer"] = 6900, ["CBB_roster/Header"] = 6900, ["CBB_roster/Player"] = 6900, ["CBB_schedule_end"] = 9600, ["CBB_schedule_entry"] = 9700, ["CBB_schedule_start"] = 9700, ["CBB_yearly_record_end"] = 3800, ["CBB_yearly_record_end/legend"] = 3400, ["CBB_yearly_record_entry"] = 3800, ["CBB_yearly_record_start"] = 3700, ["CBB_yearly_record_subhead"] = 3500, ["CBB_yearly_record_subtotal"] = 3600, ["CBSB_Standings_End"] = 4000, ["CBSB_Standings_Entry"] = 4000, ["CBSB_Standings_Start"] = 4000, ["CBSB_link"] = 3300, ["CC0"] = 4500, ["CENTURY"] = 16000, ["CFB_Standings_End"] = 32000, ["CFB_Standings_Entry"] = 32000, ["CFB_Standings_Start"] = 32000, ["CFB_Yearly_Record_End"] = 6400, ["CFB_Yearly_Record_End/legend"] = 2300, ["CFB_Yearly_Record_Entry"] = 6400, ["CFB_Yearly_Record_Start"] = 6400, ["CFB_Yearly_Record_Subhead"] = 6400, ["CFB_Yearly_Record_Subtotal"] = 6300, ["CFB_schedule"] = 24000, ["CFB_schedule_entry"] = 17000, ["CFL_Year"] = 5400, ["CGF_year"] = 2500, ["CHE"] = 10000, ["CHI"] = 2800, ["CHL"] = 3600, ["CHN"] = 11000, ["CN"] = 2300, ["CO2"] = 2200, ["COI"] = 14000, ["COIUL"] = 124000, ["COI_editnotice"] = 6300, ["COL"] = 4700, ["COLON"] = 13000, ["CRI"] = 2100, ["CRO"] = 4000, ["CSK"] = 2800, ["CSS_image_crop"] = 3900, ["CUB"] = 3500, ["CURRENTDATE"] = 3600, ["CURRENTISOYEAR"] = 2100, ["CURRENTMINUTE"] = 2500, ["CZE"] = 14000, ["Calendar"] = 2400, ["California/color"] = 11000, ["Call_sign_disambiguation"] = 2900, ["Campaignbox"] = 21000, ["CanProvName"] = 12000, ["CanadaByProvinceCatNav"] = 9700, ["CanadaProvinceThe"] = 3900, ["Canadian_English"] = 5200, ["Canadian_Parliament_links"] = 5100, ["Canadian_election_result"] = 13000, ["Canadian_election_result/gain"] = 2500, ["Canadian_election_result/hold"] = 4600, ["Canadian_election_result/source"] = 7600, ["Canadian_election_result/top"] = 12000, ["Canadian_election_result/top/ElectionYearTest"] = 5300, ["Canadian_election_result/total"] = 9700, ["Canadian_party_colour"] = 7500, ["Canadian_party_colour/colour"] = 16000, ["Canadian_party_colour/colour/default"] = 16000, ["Canadian_party_colour/name"] = 14000, ["Canadian_party_colour/name/default"] = 6100, ["Canned_search"] = 4000, ["Cascite"] = 15000, ["Caselaw_source"] = 3900, ["Cast_listing"] = 11000, ["Cat"] = 295000, ["CatAutoTOC"] = 626000, ["CatAutoTOC/core"] = 625000, ["CatRel"] = 3800, ["CatTrack"] = 3100, ["Cat_class"] = 6600, ["Cat_in_use"] = 50000, ["Cat_main"] = 176000, ["Cat_more"] = 108000, ["Cat_more_if_exists"] = 44000, ["Cat_see_also"] = 3400, ["Catalog_lookup_link"] = 488000, ["Category"] = 235000, ["Category-Class"] = 14000, ["Category-inline"] = 8600, ["Category_TOC"] = 71000, ["Category_TOC/tracking"] = 71000, ["Category_U.S._State_elections_by_year"] = 7300, ["Category_U.S._State_elections_by_year/core"] = 7200, ["Category_class"] = 35000, ["Category_class/column"] = 35000, ["Category_class/second_row_column"] = 35000, ["Category_described_in_year"] = 5700, ["Category_diffuse"] = 7600, ["Category_disambiguation"] = 2300, ["Category_disambiguation/category_link"] = 2300, ["Category_explanation"] = 75000, ["Category_handler"] = 3220000, ["Category_ifexist"] = 4800, ["Category_importance"] = 10000, ["Category_importance/column"] = 10000, ["Category_importance/second_row_column"] = 10000, ["Category_link"] = 348000, ["Category_link_with_count"] = 5800, ["Category_ordered_by_date"] = 9800, ["Category_other"] = 851000, ["Category_redirect"] = 103000, ["Category_see_also"] = 33000, ["Category_see_also/Category_pair_check"] = 33000, ["Category_see_also_if_exists"] = 71000, ["Category_see_also_if_exists_2"] = 84000, ["Category_title"] = 2400, ["Catexp"] = 7100, ["CathEncy"] = 2300, ["Catholic"] = 4200, ["Catholic_Encyclopedia"] = 5100, ["Catmain"] = 25000, ["Catmore"] = 9400, ["Caution"] = 2100, ["Cbb_link"] = 7700, ["Cbignore"] = 97000, ["Cbsb_link"] = 2000, ["Cc-by-2.5"] = 4300, ["Cc-by-3.0"] = 9700, ["Cc-by-sa-2.5"] = 3000, ["Cc-by-sa-2.5,2.0,1.0"] = 3100, ["Cc-by-sa-3.0"] = 29000, ["Cc-by-sa-3.0,2.5,2.0,1.0"] = 2700, ["Cc-by-sa-3.0-migrated"] = 28000, ["Cc-by-sa-4.0"] = 12000, ["Cc-zero"] = 4400, ["CensusAU"] = 10000, ["Census_2016_AUS"] = 7900, ["Cent"] = 5400, ["Center"] = 248000, ["Centralized_discussion"] = 5700, ["Centralized_discussion/core"] = 5700, ["Centralized_discussion/styles.css"] = 5700, ["Centre"] = 2600, ["Century"] = 2000, ["Century_name_from_decade_or_year"] = 72000, ["Century_name_from_title_decade"] = 7300, ["Century_name_from_title_year"] = 7100, ["Certification_Cite/Title"] = 26000, ["Certification_Cite/URL"] = 29000, ["Certification_Cite/archivedate"] = 5500, ["Certification_Cite/archiveurl"] = 5500, ["Certification_Cite_Ref"] = 26000, ["Certification_Table_Bottom"] = 25000, ["Certification_Table_Entry"] = 26000, ["Certification_Table_Entry/Foot"] = 25000, ["Certification_Table_Entry/Foot/helper"] = 25000, ["Certification_Table_Entry/Region"] = 26000, ["Certification_Table_Entry/Sales"] = 25000, ["Certification_Table_Entry/Sales/DanishPeriod"] = 2800, ["Certification_Table_Entry/Sales/DanishPeriodHelper1"] = 2800, ["Certification_Table_Entry/Sales/DanishPeriodHelper2"] = 2800, ["Certification_Table_Entry/Sales/GermanPeriod"] = 3200, ["Certification_Table_Entry/Sales/ItalianHelper"] = 2900, ["Certification_Table_Top"] = 27000, ["Cfb_link"] = 23000, ["Cfd_result"] = 2400, ["Cfdend"] = 4000, ["Chart"] = 4600, ["Chart/end"] = 4600, ["Chart/start"] = 4600, ["Chart_bottom"] = 3000, ["Chart_top"] = 3000, ["Check_completeness_of_transclusions"] = 6400, ["Check_talk"] = 27000, ["Check_talk_wp"] = 1380000, ["Check_winner_by_scores"] = 13000, ["CheckedSockpuppet"] = 7100, ["Checked_sockpuppet"] = 18000, ["Checkedsockpuppet"] = 5300, ["Checkip"] = 12000, ["Checkuser"] = 71000, ["Checkuserblock-account"] = 9400, ["Chem"] = 4700, ["Chem/atom"] = 4600, ["Chem/link"] = 4700, ["Chem2"] = 2100, ["Chem_molar_mass"] = 17000, ["Chem_molar_mass/format"] = 17000, ["Chembox"] = 13000, ["Chembox/styles.css"] = 13000, ["Chembox_3DMet"] = 13000, ["Chembox_3DMet/format"] = 13000, ["Chembox_AllOtherNames"] = 12000, ["Chembox_AllOtherNames/format"] = 12000, ["Chembox_Appearance"] = 5600, ["Chembox_BoilingPt"] = 3600, ["Chembox_CASNo"] = 13000, ["Chembox_CASNo/format"] = 13000, ["Chembox_CalcTemperatures"] = 6400, ["Chembox_ChEBI"] = 13000, ["Chembox_ChEBI/format"] = 13000, ["Chembox_ChEMBL"] = 13000, ["Chembox_ChEMBL/format"] = 13000, ["Chembox_ChemSpiderID"] = 13000, ["Chembox_ChemSpiderID/format"] = 13000, ["Chembox_CompTox"] = 13000, ["Chembox_CompTox/format"] = 13000, ["Chembox_Datapage_check"] = 13000, ["Chembox_Density"] = 4600, ["Chembox_DrugBank"] = 13000, ["Chembox_DrugBank/format"] = 13000, ["Chembox_ECHA"] = 7300, ["Chembox_ECNumber"] = 13000, ["Chembox_ECNumber/format"] = 13000, ["Chembox_Elements"] = 13000, ["Chembox_Elements/molecular_formula"] = 17000, ["Chembox_Footer"] = 13000, ["Chembox_Footer/tracking"] = 13000, ["Chembox_GHS_(set)"] = 3300, ["Chembox_Hazards"] = 11000, ["Chembox_IUPHAR_ligand"] = 13000, ["Chembox_IUPHAR_ligand/format"] = 13000, ["Chembox_Identifiers"] = 13000, ["Chembox_InChI"] = 12000, ["Chembox_InChI/format"] = 12000, ["Chembox_Indexlist"] = 13000, ["Chembox_Jmol"] = 13000, ["Chembox_Jmol/format"] = 13000, ["Chembox_KEGG"] = 13000, ["Chembox_KEGG/format"] = 13000, ["Chembox_MeltingPt"] = 5500, ["Chembox_Properties"] = 13000, ["Chembox_PubChem"] = 13000, ["Chembox_PubChem/format"] = 13000, ["Chembox_RTECS"] = 13000, ["Chembox_RTECS/format"] = 13000, ["Chembox_Related"] = 3000, ["Chembox_SMILES"] = 12000, ["Chembox_SMILES/format"] = 12000, ["Chembox_SolubilityInWater"] = 3700, ["Chembox_UNII"] = 13000, ["Chembox_UNII/format"] = 13000, ["Chembox_headerbar"] = 13000, ["Chembox_image"] = 12000, ["Chembox_image_cell"] = 12000, ["Chembox_image_sbs"] = 12000, ["Chembox_parametercheck"] = 13000, ["Chembox_setDatarow"] = 4300, ["Chembox_setHeader"] = 4300, ["Chembox_templatePar/formatPreviewMessage"] = 13000, ["Chembox_verification"] = 7100, ["Chemicals"] = 7300, ["Chemistry"] = 2900, ["Chemspidercite"] = 11000, ["Chessgames_player"] = 3400, ["Chinese"] = 7700, ["Chr"] = 8900, ["ChristianityWikiProject"] = 6000, ["Circa"] = 52000, ["Circular_reference"] = 4700, ["Citation"] = 352000, ["Citation/make_link"] = 5400, ["Citation/styles.css"] = 44000, ["Citation_needed"] = 505000, ["Citation_needed_span"] = 3200, ["Citation_style"] = 4300, ["Cite_AV_media"] = 39000, ["Cite_AV_media_notes"] = 24000, ["Cite_Appletons'"] = 2400, ["Cite_Australian_Dictionary_of_Biography"] = 2900, ["Cite_Catholic_Encyclopedia"] = 8100, ["Cite_Colledge2006"] = 3100, ["Cite_DCB"] = 2800, ["Cite_DNB"] = 17000, ["Cite_EB1911"] = 24000, ["Cite_GNIS"] = 2500, ["Cite_Gaia_DR2"] = 2300, ["Cite_Jewish_Encyclopedia"] = 2800, ["Cite_NIE"] = 3600, ["Cite_NSW_Parliament"] = 3300, ["Cite_NSW_SHR"] = 2600, ["Cite_ODNB"] = 15000, ["Cite_Q"] = 48000, ["Cite_QHR"] = 3000, ["Cite_QPN"] = 3900, ["Cite_Rowlett"] = 2500, ["Cite_Russian_law"] = 7800, ["Cite_Sports-Reference"] = 54000, ["Cite_WoRMS"] = 4900, ["Cite_act"] = 2200, ["Cite_arXiv"] = 4400, ["Cite_bcgnis"] = 2900, ["Cite_book"] = 1480000, ["Cite_certification"] = 29000, ["Cite_cgndb"] = 2900, ["Cite_conference"] = 14000, ["Cite_court"] = 5000, ["Cite_dictionary"] = 5100, ["Cite_document"] = 8200, ["Cite_encyclopedia"] = 190000, ["Cite_episode"] = 16000, ["Cite_gnis"] = 35000, ["Cite_interview"] = 6800, ["Cite_iucn"] = 54000, ["Cite_journal"] = 884000, ["Cite_magazine"] = 196000, ["Cite_map"] = 32000, ["Cite_news"] = 1380000, ["Cite_newspaper_The_Times"] = 6100, ["Cite_patent"] = 4900, ["Cite_patent/authors"] = 3900, ["Cite_patent/core"] = 5200, ["Cite_peakbagger"] = 4100, ["Cite_podcast"] = 3100, ["Cite_press_release"] = 57000, ["Cite_report"] = 30000, ["Cite_rowlett"] = 2500, ["Cite_simbad"] = 4200, ["Cite_sports-reference"] = 58000, ["Cite_thesis"] = 24000, ["Cite_tweet"] = 29000, ["Cite_video"] = 12000, ["Cite_video_game"] = 3000, ["Cite_web"] = 4320000, ["Cite_wikisource"] = 5100, ["Cite_wikisource/make_link"] = 55000, ["Civil_navigation"] = 2700, ["Cl"] = 112000, ["Clade"] = 6600, ["Clade/styles.css"] = 6600, ["Clarify"] = 38000, ["Class"] = 9620000, ["Class/colour"] = 612000, ["Class/icon"] = 117000, ["Class_mask"] = 9860000, ["Class_mask/b"] = 332000, ["Classical"] = 7000, ["Classicon"] = 4600, ["Clc"] = 5000, ["Cleanup"] = 11000, ["Cleanup_bare_URLs"] = 3300, ["Cleanup_reorganize"] = 2600, ["Cleanup_rewrite"] = 5500, ["Clear"] = 3480000, ["Clear-left"] = 19000, ["Clear_left"] = 31000, ["Clear_right"] = 2800, ["Clerk-Note"] = 9300, ["Clerknote"] = 7000, ["Clickable_button"] = 13000, ["Clickable_button_2"] = 876000, ["Clr"] = 3700, ["Cmbox"] = 399000, ["Cn"] = 75000, ["Cnote2"] = 2100, ["Cnote2_Begin"] = 2100, ["Cnote2_End"] = 2100, ["Coat_of_arms"] = 7500, ["Cob"] = 11000, ["Code"] = 48000, ["Col-1-of-2"] = 2500, ["Col-2"] = 166000, ["Col-2-of-2"] = 2300, ["Col-3"] = 10000, ["Col-4"] = 3500, ["Col-begin"] = 210000, ["Col-break"] = 208000, ["Col-end"] = 208000, ["Col-float"] = 2400, ["Col-float-break"] = 2300, ["Col-float-end"] = 2300, ["Col-float/styles.css"] = 2400, ["Col-start"] = 22000, ["Colbegin"] = 40000, ["Colend"] = 52000, ["Collapse"] = 9100, ["Collapse_bottom"] = 48000, ["Collapse_top"] = 49000, ["Collapsebottom"] = 3800, ["Collapsetop"] = 3800, ["Collapsible_list"] = 50000, ["Collapsible_option"] = 130000, ["College"] = 8000, ["CollegePrimaryHeader"] = 5000, ["CollegePrimaryStyle"] = 90000, ["CollegeSecondaryStyle"] = 2600, ["College_Athlete_Recruit_End"] = 2600, ["College_Athlete_Recruit_Entry"] = 2700, ["College_Athlete_Recruit_Start"] = 2700, ["College_athlete_recruit_end"] = 3700, ["College_athlete_recruit_entry"] = 3800, ["College_athlete_recruit_start"] = 3800, ["College_color_list"] = 3700, ["Colon"] = 17000, ["Color"] = 472000, ["Color_box"] = 71000, ["Colorbox"] = 3400, ["Colorbull"] = 5300, ["Colored_link"] = 34000, ["Colors"] = 2100, ["Colour"] = 9200, ["Coloured_link"] = 5000, ["Column"] = 2100, ["Column/styles.css"] = 2200, ["Columns-list"] = 87000, ["Comedy"] = 2600, ["Comic_Book_DB"] = 3700, ["Comicbookdb"] = 3600, ["Comics-replaceability"] = 3000, ["Comics_infobox_sec"] = 12000, ["Comics_infobox_sec/creator_nat"] = 3000, ["Comics_infobox_sec/formcat"] = 3100, ["Comics_infobox_sec/genre"] = 3900, ["Comics_infobox_sec/genrecat"] = 3500, ["Comicsproj"] = 28000, ["Comicsyrimage"] = 2000, ["Comma_separated_entries"] = 398000, ["Comma_separated_values"] = 39000, ["Comment"] = 4700, ["Committed_identity"] = 3000, ["Committed_identity/styles.css"] = 3000, ["Commons"] = 64000, ["Commons-inline"] = 18000, ["Commons_cat"] = 48000, ["Commons_category"] = 822000, ["Commons_category-inline"] = 134000, ["Commons_category_inline"] = 5600, ["Commonscat"] = 64000, ["Commonscat-inline"] = 18000, ["Commonscat_inline"] = 2200, ["Commonscatinline"] = 7000, ["Compact_TOC"] = 6800, ["Compact_ToC"] = 5000, ["Compare"] = 4700, ["Compare_image_with_Wikidata"] = 9000, ["Composition_bar"] = 9500, ["Confirmed"] = 15000, ["Confused"] = 2500, ["Confusing"] = 2400, ["CongBio"] = 9700, ["CongLinks"] = 4400, ["Connected_contributor"] = 16000, ["Connected_contributor_(paid)"] = 6400, ["Constellation_navbox"] = 6000, ["Container"] = 9600, ["Container_cat"] = 7300, ["Container_category"] = 39000, ["Containercat"] = 2700, ["Contains_special_characters"] = 3700, ["Contains_special_characters/core"] = 3700, ["Contains_special_characters/styles.css"] = 3700, ["Content_category"] = 7500, ["Context"] = 2800, ["Continent2continental"] = 16000, ["Continent_adjective_to_noun"] = 2200, ["Controversial"] = 3100, ["Convert"] = 1120000, ["Convinfobox"] = 195000, ["Convinfobox/2"] = 14000, ["Convinfobox/3"] = 116000, ["Convinfobox/pri2"] = 58000, ["Convinfobox/prisec2"] = 2800, ["Convinfobox/prisec3"] = 24000, ["Convinfobox/sec2"] = 8200, ["Coord"] = 1300000, ["Coord_missing"] = 104000, ["Coord_missing/CheckCat"] = 103000, ["Coords"] = 7800, ["Copied"] = 17000, ["Copy_to_Wikimedia_Commons"] = 125000, ["Copyvios"] = 2800, ["Cospar"] = 3100, ["Cot"] = 11000, ["Count"] = 8100, ["Country2continent"] = 29000, ["Country2continental"] = 2400, ["Country2nationality"] = 73000, ["CountryPrefixThe"] = 102000, ["Country_abbreviation"] = 85000, ["Country_alias"] = 15000, ["Country_at_games_navbox"] = 2500, ["Country_at_games_navbox/below"] = 2500, ["Country_data"] = 5700, ["Country_data_AFG"] = 2000, ["Country_data_ALB"] = 6000, ["Country_data_ALG"] = 8600, ["Country_data_AND"] = 2700, ["Country_data_ANG"] = 3700, ["Country_data_ARG"] = 44000, ["Country_data_ARM"] = 6500, ["Country_data_AUS"] = 71000, ["Country_data_AUT"] = 43000, ["Country_data_AZE"] = 8000, ["Country_data_Afghanistan"] = 11000, ["Country_data_Alabama"] = 2000, ["Country_data_Alaska"] = 2300, ["Country_data_Albania"] = 17000, ["Country_data_Alberta"] = 3500, ["Country_data_Algeria"] = 22000, ["Country_data_American_Samoa"] = 3000, ["Country_data_Andorra"] = 7600, ["Country_data_Angola"] = 10000, ["Country_data_Anguilla"] = 2700, ["Country_data_Antigua_and_Barbuda"] = 5900, ["Country_data_Apulia"] = 7900, ["Country_data_Argentina"] = 72000, ["Country_data_Arizona"] = 2400, ["Country_data_Arkansas"] = 2500, ["Country_data_Armenia"] = 19000, ["Country_data_Aruba"] = 3600, ["Country_data_Australia"] = 114000, ["Country_data_Austria"] = 68000, ["Country_data_Azerbaijan"] = 24000, ["Country_data_BAH"] = 3800, ["Country_data_BAN"] = 3600, ["Country_data_BAR"] = 2400, ["Country_data_BEL"] = 48000, ["Country_data_BER"] = 2200, ["Country_data_BHR"] = 4100, ["Country_data_BIH"] = 12000, ["Country_data_BLR"] = 23000, ["Country_data_BOL"] = 5300, ["Country_data_BOT"] = 2100, ["Country_data_BRA"] = 54000, ["Country_data_BUL"] = 23000, ["Country_data_Bahamas"] = 9400, ["Country_data_Bahrain"] = 10000, ["Country_data_Bangladesh"] = 16000, ["Country_data_Barbados"] = 7900, ["Country_data_Belarus"] = 39000, ["Country_data_Belgium"] = 78000, ["Country_data_Belize"] = 5100, ["Country_data_Benin"] = 7000, ["Country_data_Bermuda"] = 5700, ["Country_data_Bhutan"] = 4600, ["Country_data_Bolivia"] = 14000, ["Country_data_Bosnia_and_Herzegovina"] = 26000, ["Country_data_Botswana"] = 8800, ["Country_data_Brazil"] = 92000, ["Country_data_British_Columbia"] = 3200, ["Country_data_British_Raj"] = 2100, ["Country_data_British_Virgin_Islands"] = 3400, ["Country_data_Brunei"] = 5900, ["Country_data_Bulgaria"] = 46000, ["Country_data_Burkina_Faso"] = 9800, ["Country_data_Burma"] = 2700, ["Country_data_Burundi"] = 5600, ["Country_data_CAN"] = 55000, ["Country_data_CGO"] = 2200, ["Country_data_CHE"] = 4500, ["Country_data_CHI"] = 17000, ["Country_data_CHN"] = 39000, ["Country_data_CIV"] = 7400, ["Country_data_CMR"] = 8100, ["Country_data_COD"] = 3000, ["Country_data_COL"] = 23000, ["Country_data_CRC"] = 6200, ["Country_data_CRO"] = 31000, ["Country_data_CUB"] = 9100, ["Country_data_CYP"] = 8300, ["Country_data_CZE"] = 43000, ["Country_data_California"] = 6600, ["Country_data_Cambodia"] = 8400, ["Country_data_Cameroon"] = 16000, ["Country_data_Canada"] = 110000, ["Country_data_Cape_Verde"] = 6000, ["Country_data_Castile_and_León"] = 2000, ["Country_data_Catalonia"] = 3000, ["Country_data_Cayman_Islands"] = 4200, ["Country_data_Central_African_Republic"] = 4800, ["Country_data_Chad"] = 5300, ["Country_data_Chile"] = 36000, ["Country_data_China"] = 74000, ["Country_data_Chinese_Taipei"] = 17000, ["Country_data_Colombia"] = 41000, ["Country_data_Colorado"] = 5800, ["Country_data_Comoros"] = 4300, ["Country_data_Confederate_States_of_America"] = 3000, ["Country_data_Connecticut"] = 3400, ["Country_data_Cook_Islands"] = 3700, ["Country_data_Costa_Rica"] = 16000, ["Country_data_Croatia"] = 50000, ["Country_data_Cuba"] = 20000, ["Country_data_Curaçao"] = 3300, ["Country_data_Cyprus"] = 19000, ["Country_data_Czech_Republic"] = 71000, ["Country_data_Czechoslovakia"] = 16000, ["Country_data_DEN"] = 32000, ["Country_data_DEU"] = 8100, ["Country_data_DNK"] = 3300, ["Country_data_DOM"] = 6800, ["Country_data_Democratic_Republic_of_the_Congo"] = 11000, ["Country_data_Denmark"] = 63000, ["Country_data_Djibouti"] = 4500, ["Country_data_Dominica"] = 4300, ["Country_data_Dominican_Republic"] = 15000, ["Country_data_ECU"] = 11000, ["Country_data_EGY"] = 12000, ["Country_data_ENG"] = 44000, ["Country_data_ESA"] = 2100, ["Country_data_ESP"] = 68000, ["Country_data_EST"] = 13000, ["Country_data_ETH"] = 3200, ["Country_data_EU"] = 3800, ["Country_data_East_Germany"] = 12000, ["Country_data_East_Timor"] = 4900, ["Country_data_Ecuador"] = 22000, ["Country_data_Egypt"] = 31000, ["Country_data_El_Salvador"] = 12000, ["Country_data_Empire_of_Japan"] = 3800, ["Country_data_England"] = 87000, ["Country_data_Equatorial_Guinea"] = 5100, ["Country_data_Eritrea"] = 5200, ["Country_data_Estonia"] = 32000, ["Country_data_Eswatini"] = 4800, ["Country_data_Ethiopia"] = 12000, ["Country_data_Europe"] = 2400, ["Country_data_European_Union"] = 7400, ["Country_data_FIJ"] = 3600, ["Country_data_FIN"] = 32000, ["Country_data_FRA"] = 91000, ["Country_data_FRG"] = 13000, ["Country_data_FR_Yugoslavia"] = 3700, ["Country_data_Falkland_Islands"] = 2100, ["Country_data_Faroe_Islands"] = 5200, ["Country_data_Federated_States_of_Micronesia"] = 3100, ["Country_data_Fiji"] = 11000, ["Country_data_Finland"] = 58000, ["Country_data_Florida"] = 6900, ["Country_data_France"] = 186000, ["Country_data_French_Guiana"] = 2100, ["Country_data_French_Polynesia"] = 3600, ["Country_data_GAB"] = 2200, ["Country_data_GBR"] = 51000, ["Country_data_GDR"] = 6900, ["Country_data_GEO"] = 12000, ["Country_data_GER"] = 76000, ["Country_data_GHA"] = 9100, ["Country_data_GRE"] = 24000, ["Country_data_GUA"] = 4800, ["Country_data_GUI"] = 2900, ["Country_data_GUY"] = 2300, ["Country_data_Gabon"] = 7300, ["Country_data_Gambia"] = 6400, ["Country_data_Georgia"] = 7800, ["Country_data_Georgia_(U.S._state)"] = 2800, ["Country_data_Georgia_(country)"] = 25000, ["Country_data_German_Empire"] = 5200, ["Country_data_Germany"] = 136000, ["Country_data_Ghana"] = 21000, ["Country_data_Gibraltar"] = 4900, ["Country_data_Great_Britain"] = 60000, ["Country_data_Greece"] = 52000, ["Country_data_Greenland"] = 2700, ["Country_data_Grenada"] = 5100, ["Country_data_Guadeloupe"] = 2700, ["Country_data_Guam"] = 4700, ["Country_data_Guatemala"] = 12000, ["Country_data_Guernsey"] = 2400, ["Country_data_Guinea"] = 8100, ["Country_data_Guinea-Bissau"] = 4900, ["Country_data_Guyana"] = 7400, ["Country_data_HAI"] = 2900, ["Country_data_HKG"] = 12000, ["Country_data_HON"] = 4200, ["Country_data_HUN"] = 34000, ["Country_data_Haiti"] = 8500, ["Country_data_Honduras"] = 11000, ["Country_data_Hong_Kong"] = 23000, ["Country_data_Hungary"] = 60000, ["Country_data_IDN"] = 4500, ["Country_data_INA"] = 9700, ["Country_data_IND"] = 28000, ["Country_data_IRE"] = 9900, ["Country_data_IRI"] = 4900, ["Country_data_IRL"] = 19000, ["Country_data_IRN"] = 5800, ["Country_data_IRQ"] = 3800, ["Country_data_ISL"] = 7900, ["Country_data_ISR"] = 20000, ["Country_data_ITA"] = 80000, ["Country_data_Iceland"] = 20000, ["Country_data_Idaho"] = 2400, ["Country_data_Illinois"] = 5600, ["Country_data_India"] = 97000, ["Country_data_Indiana"] = 3100, ["Country_data_Indonesia"] = 34000, ["Country_data_Iowa"] = 3200, ["Country_data_Iran"] = 84000, ["Country_data_Iraq"] = 13000, ["Country_data_Ireland"] = 33000, ["Country_data_Isle_of_Man"] = 3100, ["Country_data_Israel"] = 40000, ["Country_data_Italy"] = 130000, ["Country_data_Ivory_Coast"] = 16000, ["Country_data_JAM"] = 8800, ["Country_data_JOR"] = 3600, ["Country_data_JP"] = 8100, ["Country_data_JPN"] = 56000, ["Country_data_Jamaica"] = 18000, ["Country_data_Japan"] = 106000, ["Country_data_Jersey"] = 2700, ["Country_data_Jordan"] = 11000, ["Country_data_KAZ"] = 18000, ["Country_data_KEN"] = 6800, ["Country_data_KGZ"] = 3400, ["Country_data_KOR"] = 29000, ["Country_data_KSA"] = 5400, ["Country_data_KUW"] = 3800, ["Country_data_Kazakhstan"] = 31000, ["Country_data_Kentucky"] = 2300, ["Country_data_Kenya"] = 18000, ["Country_data_Kingdom_of_France"] = 2000, ["Country_data_Kingdom_of_Great_Britain"] = 4500, ["Country_data_Kingdom_of_Italy"] = 3700, ["Country_data_Kiribati"] = 3000, ["Country_data_Kosovo"] = 8000, ["Country_data_Kuwait"] = 10000, ["Country_data_Kyrgyzstan"] = 9000, ["Country_data_LAT"] = 13000, ["Country_data_LBN"] = 2000, ["Country_data_LIB"] = 2500, ["Country_data_LIE"] = 2900, ["Country_data_LIT"] = 2900, ["Country_data_LTU"] = 11000, ["Country_data_LUX"] = 9800, ["Country_data_LVA"] = 2400, ["Country_data_Laos"] = 7300, ["Country_data_Latvia"] = 29000, ["Country_data_Lebanon"] = 14000, ["Country_data_Lesotho"] = 5000, ["Country_data_Liberia"] = 7000, ["Country_data_Libya"] = 8500, ["Country_data_Liechtenstein"] = 7500, ["Country_data_Lithuania"] = 28000, ["Country_data_Louisiana"] = 2200, ["Country_data_Luxembourg"] = 21000, ["Country_data_MAC"] = 2300, ["Country_data_MAR"] = 11000, ["Country_data_MAS"] = 10000, ["Country_data_MDA"] = 6900, ["Country_data_MEX"] = 28000, ["Country_data_MGL"] = 2600, ["Country_data_MKD"] = 6900, ["Country_data_MLI"] = 4000, ["Country_data_MLT"] = 5200, ["Country_data_MNE"] = 7300, ["Country_data_MON"] = 3300, ["Country_data_MOZ"] = 2000, ["Country_data_MYA"] = 2800, ["Country_data_MYS"] = 3500, ["Country_data_Macau"] = 6100, ["Country_data_Macedonia"] = 4800, ["Country_data_Madagascar"] = 8700, ["Country_data_Malawi"] = 5500, ["Country_data_Malaysia"] = 33000, ["Country_data_Maldives"] = 6000, ["Country_data_Mali"] = 11000, ["Country_data_Malta"] = 15000, ["Country_data_Manitoba"] = 2500, ["Country_data_Marshall_Islands"] = 3700, ["Country_data_Martinique"] = 2700, ["Country_data_Maryland"] = 3600, ["Country_data_Massachusetts"] = 3200, ["Country_data_Mauritania"] = 5600, ["Country_data_Mauritius"] = 7800, ["Country_data_Mexico"] = 56000, ["Country_data_Michigan"] = 4400, ["Country_data_Minnesota"] = 4000, ["Country_data_Missouri"] = 2400, ["Country_data_Moldova"] = 17000, ["Country_data_Monaco"] = 9600, ["Country_data_Mongolia"] = 9300, ["Country_data_Montana"] = 2600, ["Country_data_Montenegro"] = 16000, ["Country_data_Montserrat"] = 2600, ["Country_data_Morocco"] = 24000, ["Country_data_Mozambique"] = 7100, ["Country_data_Myanmar"] = 13000, ["Country_data_NAM"] = 3200, ["Country_data_NED"] = 56000, ["Country_data_NEP"] = 2600, ["Country_data_NGA"] = 7400, ["Country_data_NGR"] = 7500, ["Country_data_NIR"] = 9300, ["Country_data_NLD"] = 5800, ["Country_data_NOR"] = 27000, ["Country_data_NZ"] = 3000, ["Country_data_NZL"] = 30000, ["Country_data_Namibia"] = 9500, ["Country_data_Nauru"] = 2500, ["Country_data_Nazi_Germany"] = 9400, ["Country_data_Nepal"] = 15000, ["Country_data_Netherlands"] = 100000, ["Country_data_Netherlands_Antilles"] = 2300, ["Country_data_Nevada"] = 2200, ["Country_data_New_Brunswick"] = 2600, ["Country_data_New_Caledonia"] = 3400, ["Country_data_New_Hampshire"] = 2100, ["Country_data_New_Jersey"] = 4400, ["Country_data_New_Mexico"] = 2200, ["Country_data_New_South_Wales"] = 5500, ["Country_data_New_York"] = 4200, ["Country_data_New_York_(state)"] = 7000, ["Country_data_New_Zealand"] = 55000, ["Country_data_Newfoundland_and_Labrador"] = 2300, ["Country_data_Nicaragua"] = 8200, ["Country_data_Niger"] = 5600, ["Country_data_Nigeria"] = 31000, ["Country_data_North_Carolina"] = 3800, ["Country_data_North_Korea"] = 12000, ["Country_data_North_Macedonia"] = 15000, ["Country_data_Northern_Cyprus"] = 2100, ["Country_data_Northern_Ireland"] = 14000, ["Country_data_Northern_Mariana_Islands"] = 2800, ["Country_data_Norway"] = 62000, ["Country_data_Nova_Scotia"] = 2300, ["Country_data_OMA"] = 2500, ["Country_data_Ohio"] = 5600, ["Country_data_Oman"] = 8400, ["Country_data_Ontario"] = 3800, ["Country_data_Ottoman_Empire"] = 2500, ["Country_data_PAK"] = 7700, ["Country_data_PAN"] = 5400, ["Country_data_PAR"] = 9400, ["Country_data_PER"] = 11000, ["Country_data_PHI"] = 11000, ["Country_data_PHL"] = 2600, ["Country_data_PNG"] = 2500, ["Country_data_POL"] = 46000, ["Country_data_POR"] = 29000, ["Country_data_PRC"] = 2400, ["Country_data_PRK"] = 4400, ["Country_data_PRT"] = 2700, ["Country_data_PUR"] = 7000, ["Country_data_Pakistan"] = 26000, ["Country_data_Palau"] = 3000, ["Country_data_Palestine"] = 6500, ["Country_data_Panama"] = 14000, ["Country_data_Papua_New_Guinea"] = 7700, ["Country_data_Paraguay"] = 18000, ["Country_data_Pennsylvania"] = 4200, ["Country_data_People's_Republic_of_China"] = 3200, ["Country_data_Peru"] = 29000, ["Country_data_Philippines"] = 33000, ["Country_data_Poland"] = 136000, ["Country_data_Portugal"] = 58000, ["Country_data_Prussia"] = 2500, ["Country_data_Puerto_Rico"] = 16000, ["Country_data_QAT"] = 7200, ["Country_data_Qatar"] = 15000, ["Country_data_Quebec"] = 4200, ["Country_data_ROM"] = 12000, ["Country_data_ROU"] = 24000, ["Country_data_RSA"] = 30000, ["Country_data_RUS"] = 60000, ["Country_data_Republic_of_China"] = 6000, ["Country_data_Republic_of_Ireland"] = 22000, ["Country_data_Republic_of_the_Congo"] = 7300, ["Country_data_Romania"] = 57000, ["Country_data_Russia"] = 103000, ["Country_data_Russian_Empire"] = 4600, ["Country_data_Rwanda"] = 7300, ["Country_data_SAM"] = 2900, ["Country_data_SCG"] = 3100, ["Country_data_SCO"] = 24000, ["Country_data_SEN"] = 7200, ["Country_data_SER"] = 3400, ["Country_data_SGP"] = 2300, ["Country_data_SIN"] = 6700, ["Country_data_SLO"] = 18000, ["Country_data_SLV"] = 2900, ["Country_data_SMR"] = 2900, ["Country_data_SPA"] = 4300, ["Country_data_SRB"] = 24000, ["Country_data_SRI"] = 4400, ["Country_data_SUI"] = 39000, ["Country_data_SVK"] = 27000, ["Country_data_SVN"] = 6300, ["Country_data_SWE"] = 52000, ["Country_data_SWI"] = 4500, ["Country_data_SYR"] = 3300, ["Country_data_Saint_Kitts_and_Nevis"] = 4700, ["Country_data_Saint_Lucia"] = 4800, ["Country_data_Saint_Vincent_and_the_Grenadines"] = 4700, ["Country_data_Samoa"] = 7600, ["Country_data_San_Marino"] = 8200, ["Country_data_Saskatchewan"] = 3100, ["Country_data_Saudi_Arabia"] = 17000, ["Country_data_Scotland"] = 46000, ["Country_data_Senegal"] = 15000, ["Country_data_Serbia"] = 49000, ["Country_data_Serbia_and_Montenegro"] = 5000, ["Country_data_Seychelles"] = 5400, ["Country_data_Sierra_Leone"] = 7000, ["Country_data_Singapore"] = 24000, ["Country_data_Slovakia"] = 46000, ["Country_data_Slovenia"] = 38000, ["Country_data_Solomon_Islands"] = 4600, ["Country_data_Somalia"] = 6000, ["Country_data_South_Africa"] = 59000, ["Country_data_South_Carolina"] = 3700, ["Country_data_South_Korea"] = 56000, ["Country_data_South_Sudan"] = 3800, ["Country_data_South_Vietnam"] = 2100, ["Country_data_Soviet_Union"] = 33000, ["Country_data_Spain"] = 119000, ["Country_data_Sri_Lanka"] = 17000, ["Country_data_Sudan"] = 7800, ["Country_data_Suriname"] = 6300, ["Country_data_Swaziland"] = 2000, ["Country_data_Sweden"] = 90000, ["Country_data_Switzerland"] = 72000, ["Country_data_Syria"] = 14000, ["Country_data_São_Tomé_and_Príncipe"] = 3400, ["Country_data_TAN"] = 2300, ["Country_data_TCH"] = 9500, ["Country_data_THA"] = 19000, ["Country_data_TJK"] = 2400, ["Country_data_TKM"] = 2600, ["Country_data_TPE"] = 14000, ["Country_data_TRI"] = 4600, ["Country_data_TUN"] = 9800, ["Country_data_TUR"] = 25000, ["Country_data_Taiwan"] = 11000, ["Country_data_Tajikistan"] = 8900, ["Country_data_Tanzania"] = 11000, ["Country_data_Tennessee"] = 2400, ["Country_data_Texas"] = 6200, ["Country_data_Thailand"] = 39000, ["Country_data_Togo"] = 6700, ["Country_data_Tonga"] = 6200, ["Country_data_Trinidad_and_Tobago"] = 13000, ["Country_data_Tunisia"] = 19000, ["Country_data_Turkey"] = 68000, ["Country_data_Turkmenistan"] = 7700, ["Country_data_Turks_and_Caicos_Islands"] = 2700, ["Country_data_Tuvalu"] = 2600, ["Country_data_U.S."] = 2100, ["Country_data_U.S._Virgin_Islands"] = 4900, ["Country_data_UAE"] = 8600, ["Country_data_UGA"] = 3700, ["Country_data_UK"] = 18000, ["Country_data_UKGBI"] = 2800, ["Country_data_UKR"] = 34000, ["Country_data_URS"] = 12000, ["Country_data_URU"] = 14000, ["Country_data_US"] = 5100, ["Country_data_USA"] = 127000, ["Country_data_USSR"] = 4400, ["Country_data_UZB"] = 10000, ["Country_data_Uganda"] = 12000, ["Country_data_Ukraine"] = 60000, ["Country_data_United_Arab_Emirates"] = 18000, ["Country_data_United_Kingdom"] = 82000, ["Country_data_United_Kingdom_of_Great_Britain_and_Ireland"] = 4100, ["Country_data_United_Nations"] = 4100, ["Country_data_United_States"] = 270000, ["Country_data_United_States_of_America"] = 5000, ["Country_data_Uruguay"] = 27000, ["Country_data_Uzbekistan"] = 18000, ["Country_data_VEN"] = 16000, ["Country_data_VIE"] = 5800, ["Country_data_Vanuatu"] = 5000, ["Country_data_Vatican_City"] = 2300, ["Country_data_Venezuela"] = 31000, ["Country_data_Vietnam"] = 20000, ["Country_data_Virginia"] = 3400, ["Country_data_WAL"] = 16000, ["Country_data_Wales"] = 32000, ["Country_data_Washington"] = 3300, ["Country_data_Washington,_D.C."] = 2300, ["Country_data_Washington_(state)"] = 3800, ["Country_data_West_Germany"] = 20000, ["Country_data_West_Indies"] = 2500, ["Country_data_Wisconsin"] = 6100, ["Country_data_Wyoming"] = 2300, ["Country_data_YUG"] = 9000, ["Country_data_Yemen"] = 7000, ["Country_data_Yugoslavia"] = 16000, ["Country_data_ZAF"] = 4400, ["Country_data_ZAM"] = 3000, ["Country_data_ZIM"] = 7800, ["Country_data_Zambia"] = 9200, ["Country_data_Zimbabwe"] = 16000, ["Country_flagbio"] = 24000, ["Country_name"] = 23000, ["Country_showdata"] = 5800, ["Country_topics"] = 21000, ["County"] = 7400, ["County_(judet)_of_Romania"] = 3300, ["Course_assignment"] = 4200, ["Course_details"] = 5500, ["Course_instructor"] = 2200, ["Cquote"] = 36000, ["Cr"] = 4000, ["Create_taxonomy/link"] = 99000, ["Cref2"] = 2200, ["Cricinfo"] = 23000, ["Cricketarchive"] = 3100, ["Crime_opentask"] = 41000, ["Croatian_Census_2011"] = 2100, ["Cross"] = 3000, ["Crossreference"] = 2200, ["Crossreference/styles.css"] = 2200, ["Csv"] = 2900, ["Ct"] = 12000, ["Curlie"] = 6900, ["Currency"] = 2900, ["Current_events"] = 8700, ["Current_events/styles.css"] = 8700, ["Currentdate"] = 22000, ["Cvt"] = 87000, ["Cycling_Archives"] = 4300, ["Cycling_archives"] = 2700, ["Cycling_team_link"] = 12000, ["Module:CFB_schedule"] = 24000, ["Module:CallAssert"] = 226000, ["Module:CanElecResTopTest"] = 5300, ["Module:CanadaByProvinceCatNav"] = 9700, ["Module:Cat_main"] = 176000, ["Module:Cat_more_if_exists"] = 44000, ["Module:Catalog_lookup_link"] = 488000, ["Module:Category_described_in_year"] = 5700, ["Module:Category_described_in_year/conf"] = 5700, ["Module:Category_handler"] = 4320000, ["Module:Category_handler/blacklist"] = 4320000, ["Module:Category_handler/config"] = 4320000, ["Module:Category_handler/data"] = 4320000, ["Module:Category_handler/shared"] = 4320000, ["Module:Category_pair"] = 5900, ["Module:Category_see_also"] = 33000, ["Module:Celestial_object_quadrangle"] = 2600, ["Module:Check_DYK_hook"] = 111000, ["Module:Check_for_clobbered_parameters"] = 1160000, ["Module:Check_for_unknown_parameters"] = 13000000, ["Module:Check_isxn"] = 476000, ["Module:Check_winner_by_scores"] = 13000, ["Module:Checkuser"] = 71000, ["Module:Chem2"] = 2100, ["Module:Chem2/styles.css"] = 2100, ["Module:Citation/CS1"] = 5300000, ["Module:Citation/CS1/COinS"] = 5300000, ["Module:Citation/CS1/Configuration"] = 5300000, ["Module:Citation/CS1/Date_validation"] = 5300000, ["Module:Citation/CS1/Identifiers"] = 5300000, ["Module:Citation/CS1/Suggestions"] = 26000, ["Module:Citation/CS1/Utilities"] = 5300000, ["Module:Citation/CS1/Whitelist"] = 5300000, ["Module:Citation/CS1/styles.css"] = 5440000, ["Module:Cite_Q"] = 48000, ["Module:Cite_iucn"] = 54000, ["Module:Cite_tweet"] = 29000, ["Module:Cite_web"] = 33000, ["Module:Clade"] = 6600, ["Module:Class"] = 9590000, ["Module:Class/configuration"] = 9590000, ["Module:Class/definition.json"] = 9590000, ["Module:Class/styles.css"] = 9530000, ["Module:Clickable_button_2"] = 876000, ["Module:Collapsible_list"] = 51000, ["Module:College_color"] = 121000, ["Module:College_color/data"] = 120000, ["Module:Color_contrast"] = 484000, ["Module:Color_contrast/colors"] = 486000, ["Module:Commons_link"] = 238000, ["Module:Complex_date"] = 67000, ["Module:Convert"] = 1180000, ["Module:Convert/data"] = 1180000, ["Module:Convert/helper"] = 7100, ["Module:Convert/text"] = 1180000, ["Module:Convert/wikidata"] = 2600, ["Module:Convert/wikidata/data"] = 2600, ["Module:ConvertNumeric"] = 27000, ["Module:Convert_character_width"] = 2800, ["Module:Convert_character_width/data"] = 2800, ["Module:Coordinates"] = 1300000, ["Module:Coordinates/styles.css"] = 1300000, ["Module:Copied"] = 17000, ["Module:CountryAdjectiveDemonym"] = 42000, ["Module:CountryAdjectiveDemonym/Adjectives"] = 42000, ["Module:CountryAdjectiveDemonym/Demonyms"] = 42000, ["Module:CountryAdjectiveDemonym/The"] = 42000, ["Module:CountryData"] = 40000, ["Module:CountryData/cacheA"] = 2100, ["Module:CountryData/cacheE"] = 2400, ["Module:CountryData/summary"] = 40000, ["Module:Country_adjective"] = 4000, ["Module:Country_alias"] = 51000, ["Module:Country_alias/data"] = 51000, ["Module:Currency"] = 3000, ["Module:Currency/Presentation"] = 3000, } 2efe2bd63761fa4eec18cf757a7ac1e7b18345a5 Template:Center 10 6 317 316 2022-08-01T11:02:25Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Center]] wikitext text/x-wiki <includeonly><div class="center" style="width:auto; margin-left:auto; margin-right:auto;{{#if: {{{style|}}} | {{{style}}};}}">{{{1|[[Category:Pages using center with no arguments]]}}}</div></includeonly><noinclude> {{documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 1bcdac1c025611248a10a1f17cdfdedcc3b1d6c1 Module:Collapsible list 828 42 319 318 2022-08-01T11:02:43Z 17ademoladav 2 1 revision imported from [[:wikipedia:Module:Collapsible_list]] Scribunto text/plain -- This module implements {{collapsible list}}. local p = {} local function gettitlestyletracking( ts ) if not ts then return '' end ts = mw.ustring.gsub(mw.ustring.lower(ts), '%s', '') local tsvals = mw.text.split(ts, ';') table.sort(tsvals) local skey = table.concat(tsvals,';') skey = mw.ustring.gsub(skey, '^;', '') skey = mw.text.encode(mw.text.encode(skey),'%c%[%]=') if (mw.ustring.match(';' .. ts, ';background:') or mw.ustring.match(';' .. ts, ';background%-color:')) and mw.ustring.match(';' .. ts, ';text%-align:') then return '[[Category:Pages using collapsible list with both background and text-align in titlestyle|' .. skey .. ' ]]' end return '[[Category:Pages using collapsible list without both background and text-align in titlestyle|' .. skey .. ' ]]' end local function getListItem( data ) if not type( data ) == 'string' then return '' end return mw.ustring.format( '<li style="line-height: inherit; margin: 0">%s</li>', data ) end -- Returns an array containing the keys of all positional arguments -- that contain data (i.e. non-whitespace values). local function getArgNums( args ) local nums = {} for k, v in pairs( args ) do if type( k ) == 'number' and k >= 1 and math.floor( k ) == k and type( v ) == 'string' and mw.ustring.match( v, '%S' ) then table.insert( nums, k ) end end table.sort( nums ) return nums end -- Formats a list of classes, styles or other attributes. local function formatAttributes( attrType, ... ) local attributes = { ... } local nums = getArgNums( attributes ) local t = {} for i, num in ipairs( nums ) do table.insert( t, attributes[ num ] ) end if #t == 0 then return '' -- Return the blank string so concatenation will work. end return mw.ustring.format( ' %s="%s"', attrType, table.concat( t, ' ' ) ) end local function buildList( args ) -- Get the list items. local listItems = {} local argNums = getArgNums( args ) for i, num in ipairs( argNums ) do table.insert( listItems, getListItem( args[ num ] ) ) end if #listItems == 0 then return '' end listItems = table.concat( listItems ) -- hack around mw-collapsible show/hide jumpiness by looking for text-alignment -- by setting a margin if centered local textAlignmentCentered = 'text%-align%s*:%s*center' local centeredTitle = (args.title_style and args.title_style:lower():match(textAlignmentCentered) or args.titlestyle and args.titlestyle:lower():match(textAlignmentCentered)) local centeredTitleSpacing if centeredTitle then centeredTitleSpacing = 'margin: 0 4em' else centeredTitleSpacing = '' end -- Get class, style and title data. local collapsibleContainerClass = formatAttributes( 'class', 'mw-collapsible', not args.expand and 'mw-collapsed' ) local collapsibleContainerStyle = formatAttributes( 'style', 'text-align: center; font-size: 95%;', args.frame_style, args.framestyle ) local collapsibleTitleStyle = formatAttributes( 'style', 'line-height: 1.6em; font-weight: bold; font-size: 100%; text-align: left;', args.title_style, args.titlestyle ) local jumpyTitleStyle = formatAttributes( 'style', centeredTitleSpacing ) local title = args.title or 'List' local ulclass = formatAttributes( 'class', 'mw-collapsible-content', args.hlist and 'hlist' ) local ulstyle = formatAttributes( 'style', 'font-size: 105%; margin-top: 0; margin-bottom: 0; line-height: inherit; text-align: left;', not args.bullets and 'list-style: none; margin-left: 0;', args.list_style, args.liststyle ) -- Build the list. return mw.ustring.format( '<div%s%s>\n<div%s><div%s>%s</div></div>\n<ul%s%s>%s</ul>\n</div>', collapsibleContainerClass, collapsibleContainerStyle, collapsibleTitleStyle, jumpyTitleStyle, title, ulclass, ulstyle, listItems ) .. gettitlestyletracking(args.title_style or args.titlestyle) end function p.main( frame ) local origArgs if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args for k, v in pairs( frame.args ) do origArgs = frame.args break end else origArgs = frame end local args = {} for k, v in pairs( origArgs ) do if type( k ) == 'number' or v ~= '' then args[ k ] = v end end return buildList( args ) end return p ff6c942509353d70048c07849e18853f5b6e9aa8 Template:Infobox UN resolution 10 129 321 320 2022-08-01T11:02:57Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Infobox_UN_resolution]] wikitext text/x-wiki {{main other|{{short description|United Nations resolution {{lc:{{{result|}}}}} {{#if:{{{year|}}}|in {{{year|}}}}}|noreplace}}}} <includeonly>{{Infobox | abovestyle = border-top:8px solid #009edb;padding-bottom:0.25em;border-bottom:2px solid #009edb; | above = UN {{#switch:{{uc:{{{organ}}}}} |GA=[[United Nations General Assembly|General Assembly]]<br>[[United Nations General Assembly resolution|Resolution]] |SC=[[United Nations Security Council|Security Council]]<br>[[United Nations Security Council resolution|Resolution]] |#default={{{organ|([[United Nations]])}}} }} {{{number}}} | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{image_size|{{{width|}}}}}}|sizedefault=230px|alt={{{alt|{{{image_alt|}}}}}}}} | caption = {{{caption|}}} | headerstyle = background:#ddd; | label1 = Date | data1 = {{{date}}} {{{year}}} | label2 = Meeting&nbsp;no. | data2 = {{{meeting|}}} | label3 = Code | data3 = {{#if:{{{code|}}} |{{{code}}}{{#if:{{{document|}}} | |<span style="display:none">}} ([{{#ifeq:{{{document}}}|yes|https://undocs.org/{{replace|{{{code}}}| |}}|{{{document}}} }} Document]){{#if:{{{document|}}} | |</span>}} }} | label4 = Subject | data4 = {{#if:{{{subject|}}} |'''{{{subject}}}'''}} | header5 = {{#if:{{{votemap|}}}|Voting}} | data6 = {{#invoke:InfoboxImage|InfoboxImage|image={{{votemap|}}}|size={{{votemap_size|}}}|sizedefault=230px|alt={{{votemap_alt|}}}}} | label7 = {{#if:{{{votemap|}}}|Summary|{{longitem|Voting summary}}}} | class7 = nowrap | data7 = {{unbulleted list | {{#if:{{{for|}}} |'''{{color|#090|{{#ifeq:{{{for}}}|0 |None | {{{for}}} }} voted for}}'''}}<!-- -->| {{#if:{{{against|}}} |'''{{color|#900|{{#ifeq:{{{against}}}|0 |None | {{{against}}} }} voted against}}'''}}<!-- -->| {{#if:{{{abstention|}}} |'''{{color|#333|{{#ifeq:{{{abstention}}}|0 |None | {{{abstention}}} }} abstained}}'''}}<!-- -->| {{#if:{{{absent|}}} |{{#ifeq:{{{absent}}}|0 |None | {{{absent}}} }} absent}}<!-- -->| {{#if:{{{presentnotvoting|}}} |{{#ifeq:{{{presentnotvoting}}}|0 |None | {{{presentnotvoting}}} }} present not voting}}<!-- -->}} | label8 = Result | data8 = {{{result|}}} | header9 = {{#ifeq:{{{organ|SC}}}|SC |[[United Nations Security Council|Security Council]] composition}} | label10 = {{longitem|Permanent members}} | class10 = nowrap | data10 = {{#ifeq:{{BASEPAGENAME}}|Infobox UN resolution <!--(show current Security Council members on template's own page:)--> | {{ubl |{{flag|China}} |{{flag|France}} |{{flag|Russia}} |{{flag|United Kingdom}} |{{flag|United States}} }} | {{#ifeq:{{{organ|SC}}}|SC | {{#ifexpr:({{{number|0}}})<=(75) | {{ubl |{{flag|Republic of China (1912–1949)|name=China}} |{{flagcountry|French Fourth Republic}} |{{flag|United Kingdom}} |{{flag|United States|1912}} |{{flag|Soviet Union|1936}} }} }} {{#ifexpr:({{{number|0}}})>=(76) and ({{{number|0}}})<=(107) | {{ubl |{{flag|Taiwan|name=China}} |{{flagcountry|French Fourth Republic}} |{{flag|United Kingdom}} |{{flag|United States|1912}} |{{flag|Soviet Union|1936}} }} }} {{#ifexpr:({{{number|0}}})>=(108) and ({{{number|0}}})<=(129) | {{ubl |{{flag|Taiwan|name=China}} |{{flagcountry|French Fourth Republic}} |{{flag|United Kingdom}} |{{flag|United States|1912}} |{{flag|Soviet Union|1955}} }} }} {{#ifexpr:({{{number|0}}})>=(130) and ({{{number|0}}})<=(131) | {{ubl |{{flag|Taiwan|name=China}} |{{flag|France|1794}} |{{flag|United Kingdom}} |{{flag|United States|1912}} |{{flag|Soviet Union|1955}} }} }} {{#ifexpr:({{{number|0}}})>=(132) and ({{{number|0}}})<=(140) | {{ubl |{{flag|Taiwan|name=China}} |{{flag|France|1794}} |{{flag|United Kingdom}} |{{flag|United States|1959}} |{{flag|Soviet Union|1955}} }} }} {{#ifexpr:({{{number|0}}})>=(141) and ({{{number|0}}})<=(301) | {{ubl |{{flag|Taiwan|name=China}} |{{flag|France|1794}} |{{flag|United Kingdom}} |{{flag|United States|1960}} |{{flag|Soviet Union|1955}} }} }} {{#ifexpr:({{{number|0}}})>=(302) and ({{{number|0}}})<=(477) | {{ubl |{{flag|China}} |{{flag|France}} |{{flag|United Kingdom}} |{{flag|United States|1960}} |{{flag|Soviet Union|1955}} }} }} {{#ifexpr:({{{number|0}}})>=(478) and ({{{number|0}}})<=(724) | {{ubl |{{flag|China}} |{{flag|France}} |{{flag|United Kingdom}} |{{flag|United States|1960}} |{{flag|Soviet Union}} }} }} {{#ifexpr:({{{number|0}}})>=(725) and ({{{number|0}}})<=(888) | {{ubl |{{flag|China}} |{{flag|France}} |{{flag|Russia|1991}} |{{flag|United Kingdom}} |{{flag|United States|1960}} }} }} {{#ifexpr:({{{number|0}}})>=(889) | {{ubl |{{flag|China}} |{{flag|France}} |{{flag|Russia}} |{{flag|United Kingdom}} |{{flag|United States}} }} }} }} }} | label11 = {{longitem|{{nowrap|Non-permanent}} members}} | class11 = nowrap | data11 = {{#ifeq:{{{organ|SC}}}|SC | {{#switch:{{{year|}}} | 1946 = {{ubl |{{flag|Australia}} |{{flag|Brazil|1889}} |{{flag|Egypt|1922}} |{{flag|Mexico|1934}} |{{flag|Netherlands}} |{{flagcountry|Polish People's Republic|1947}} }} | 1947 = {{ubl |{{flag|Australia}} |{{flag|Belgium}} |{{flagcountry|Second Brazilian Republic|1946}} |{{flag|Colombia}} |{{flagcountry|Polish People's Republic|1947}} |{{flag|Syria|1932}} }} | 1948 = {{ubl |{{flag|Argentina}} |{{flag|Belgium}} |{{flag|Canada|1921}} |{{flag|Colombia}} |{{flag|Syria|1932}} |{{flag|Ukrainian SSR|1937}} }} | 1949 = {{ubl |{{flag|Argentina}} |{{flag|Canada|1921}} |{{flagcountry|Republic of Cuba (1902–59)}} |{{flag|Egypt|1922}} |{{flag|Norway}} |{{flag|Ukrainian SSR|1937}} }} | 1950 = {{ubl |{{flagcountry|Republic of Cuba (1902–59)}} |{{flag|Ecuador|1900}} |{{flag|Egypt|1922}} |{{flag|India}} |{{flag|Norway}} |{{flag|Socialist Federal Republic of Yugoslavia|name=Yugoslavia}} }} | 1951 = {{ubl |{{flagcountry|Second Brazilian Republic|1946}} |{{flag|Ecuador|1900}} |{{flag|India}} |{{flag|Netherlands}} |{{flag|Turkey}} |{{flag|Socialist Federal Republic of Yugoslavia|name=Yugoslavia}} }} | 1952 = {{ubl |{{flagcountry|Second Brazilian Republic|1946}} |{{flag|Chile}} |{{flag|Greece|1828}} |{{flag|Netherlands}} |{{flag|Pakistan}} |{{flag|Turkey}} }} | 1953 = {{ubl |{{flag|Chile}} |{{flag|Colombia}} |{{flag|Denmark}} |{{flag|Greece|1828}} |{{flag|Lebanon}} |{{flag|Pakistan}} }} | 1954 = {{ubl |{{flagcountry|Second Brazilian Republic|1946}} |{{flag|Colombia}} |{{flag|Denmark}} |{{flag|Lebanon}} |{{flag|New Zealand}} |{{flag|Turkey}} }} | 1955 = {{ubl |{{flag|Belgium}} |{{flagcountry|Second Brazilian Republic|1946}} |{{flagcountry|Pahlavi dynasty|1925}} |{{flag|New Zealand}} |{{flag|Peru}} |{{flag|Turkey}} }} | 1956 = {{ubl |{{flag|Australia}} |{{flag|Belgium}} |{{flagcountry|Republic of Cuba (1902–59)}} |{{flagcountry|Pahlavi dynasty|1925}} |{{flag|Peru}} |{{flag|Socialist Federal Republic of Yugoslavia|name=Yugoslavia}} }} | 1957 = {{ubl |{{flag|Australia}} |{{flag|Colombia}} |{{flagcountry|Republic of Cuba (1902–59)}} |{{flagcountry|Kingdom of Iraq}} |{{flag|Philippines|1936}} |{{flag|Sweden}} }} | 1958 = {{ubl |{{flag|Canada|1957}} |{{flag|Colombia}} |{{flagcountry|Kingdom of Iraq}} |{{flag|Japan|1947}} |{{flag|Panama}} |{{flag|Sweden}} }} | 1959 = {{ubl |{{flag|Argentina}} |{{flag|Canada|1957}} |{{flag|Italy}} |{{flag|Japan|1947}} |{{flag|Panama}} |{{flag|Tunisia}} }} | 1960 = {{ubl |{{flag|Argentina}} |{{flag|Ceylon}} |{{flag|Ecuador|1900}} |{{flag|Italy}} |{{flagcountry|Polish People's Republic|1947}} |{{flag|Tunisia}} }} | 1961 = {{ubl |{{flag|Ceylon}} |{{flag|Chile}} |{{flag|Ecuador|1900}} |{{flag|Liberia}} |{{flag|Turkey}} |{{flag|United Arab Republic}} }} | 1962 = {{ubl |{{flag|Chile}} |{{flag|Ghana}} |{{flag|Republic of Ireland|name=Ireland}} |{{flagcountry|Socialist Republic of Romania|1952}} |{{flag|United Arab Republic}} |{{flag|Venezuela|1954}} }} | 1963 = {{ubl |{{flagcountry|Second Brazilian Republic}} |{{flag|Ghana}} |{{flag|Morocco}} |{{flag|Norway}} |{{flag|Philippines|1936}} |{{flag|Venezuela|1954}} }} | 1964 = {{ubl |{{flag|Bolivia}} |{{flag|Brazil|1960}} |{{flagcountry|Czechoslovak Socialist Republic}} |{{flag|Ivory Coast}} |{{flag|Morocco}} |{{flag|Norway}} }} | 1965 = {{ubl |{{flag|Bolivia}} |{{flag|Ivory Coast}} |{{flag|Jordan}} |{{flag|Malaysia}} |{{flag|Netherlands}} |{{flag|Uruguay}} }} | 1966 = {{ubl |{{flag|Argentina}} |{{flagcountry|People's Republic of Bulgaria|1946}} |{{flag|Japan|1947}} |{{flag|Jordan}} |{{flag|Mali}} |{{flag|Netherlands}} |{{flag|New Zealand}} |{{flag|Nigeria}} |{{flag|Uganda}} |{{flag|Uruguay}} }} | 1967 = {{ubl |{{flag|Argentina}} |{{flagcountry|Brazilian military government|1960}} |{{flagcountry|People's Republic of Bulgaria|1946}} |{{flag|Canada}} |{{flag|Denmark}} |{{flag|Ethiopia|1897}} |{{flag|India}} |{{flag|Japan|1947}} |{{flag|Mali}} |{{flag|Nigeria}} }} | 1968 = {{ubl |{{flag|Algeria}} |{{flagcountry|Brazilian military government|1960}} |{{flag|Canada}} |{{flag|Denmark}} |{{flag|Ethiopia|1897}} |{{flagcountry|Hungarian People's Republic}} |{{flag|India}} |{{flag|Pakistan}} |{{flag|Paraguay}} |{{flag|Senegal}} }} | 1969 = {{ubl |{{flag|Algeria}} |{{flag|Colombia}} |{{flag|Finland}} |{{flagcountry|Hungarian People's Republic}} |{{flag|Nepal}} |{{flag|Pakistan}} |{{flag|Paraguay}} |{{flag|Senegal}} |{{flag|Spain|1945}} |{{flag|Zambia|1964}} }} | 1970 = {{ubl |{{flag|Burundi}} |{{flag|Colombia}} |{{flag|Finland}} |{{flag|Nepal}} |{{flag|Nicaragua}} |{{flagcountry|Polish People's Republic|1947}} |{{flag|Sierra Leone}} |{{flag|Spain|1945}} |{{flag|Syria|1963}} |{{flag|Zambia|1964}} }} | 1971 = {{ubl |{{flag|Argentina}} |{{flag|Belgium}} |{{flag|Burundi}} |{{flag|Italy}} |{{flag|Japan|1947}} |{{flag|Nicaragua}} |{{flagcountry|Polish People's Republic|1947}} |{{flag|Sierra Leone}} |{{flag|Somalia}} |{{flag|Syria|1963}} }} | 1972 = {{ubl |{{flag|Argentina}} |{{flag|Belgium}} |{{flag|Guinea}} |{{flag|India}} |{{flag|Italy}} |{{flag|Japan|1947}} |{{flag|Panama}} |{{flag|Somalia}} |{{flag|Sudan}} |{{flag|Socialist Federal Republic of Yugoslavia|name=Yugoslavia}} }} | 1973 = {{ubl |{{flag|Australia}} |{{flag|Austria}} |{{flag|Guinea}} |{{flag|India}} |{{flag|Indonesia}} |{{flag|Kenya}} |{{flag|Panama}} |{{flag|Peru}} |{{flag|Sudan}} |{{flag|Socialist Federal Republic of Yugoslavia|name=Yugoslavia}} }} | 1974 = {{ubl |{{flag|Australia}} |{{flag|Austria}} |{{flag|Byelorussian SSR}} |{{flag|Cameroon}} |{{flag|Costa Rica}} |{{flag|Indonesia}} |{{flagdeco|Iraq|1963}} [[Ba'athist Iraq|Iraq]] |{{flag|Kenya}} |{{flag|Mauritania|1959}} |{{flag|Peru}} }} | 1975 = {{ubl |{{flag|Byelorussian SSR}} |{{flag|Cameroon}} |{{flag|Costa Rica}} |{{flag|Guyana}} |{{flagdeco|Iraq|1963}} [[Ba'athist Iraq|Iraq]] |{{flag|Italy}} |{{flag|Japan|1947}} |{{flag|Mauritania|1959}} |{{flag|Sweden}} |{{flag|Tanzania}} }} | 1976 = {{ubl |{{flag|Benin|1975}} |{{flag|Guyana}} |{{flag|Italy}} |{{flag|Japan|1947}} |{{flag|Libya|1972}} |{{flag|Pakistan}} |{{flag|Panama}} |{{flagcountry|Socialist Republic of Romania|1965}} |{{flag|Sweden}} |{{flag|Tanzania}} }} | 1977 = {{ubl |{{flag|Benin|1975}} |{{flag|Canada}} |{{flag|India}} |{{#ifexpr:({{{number|0}}})>=(403) and ({{{number|0}}})<=(404)|{{flag|Libya|1972}} }} {{#ifexpr:({{{number|0}}})>=(405) and ({{{number|0}}})<=(422)|{{flag|Libya|1977}} }} |{{flag|Mauritania|1959}} |{{flag|Pakistan}} |{{flag|Panama}} |{{flagcountry|Socialist Republic of Romania|1965}} |{{flag|Venezuela|1954}} |{{flag|West Germany}} }} | 1978 = {{ubl |{{flag|Bolivia}} |{{flag|Canada}} |{{flagcountry|Czechoslovak Socialist Republic}} |{{flag|Gabon}} |{{flag|India}} |{{flag|Kuwait}} |{{flag|Mauritania|1959}} |{{flag|Nigeria}} |{{flag|Venezuela|1954}} |{{flag|West Germany}} }} | 1979 = {{ubl |{{flag|Bangladesh}} |{{flag|Bolivia}} |{{flagcountry|Czechoslovak Socialist Republic}} |{{flag|Gabon}} |{{flag|Jamaica}} |{{flag|Kuwait}} |{{flag|Nigeria}} |{{flag|Norway}} |{{flag|Portugal}} |{{flag|Zambia|1964}} }} | 1980 = {{ubl |{{flag|Bangladesh}} |{{flag|East Germany}} |{{flag|Jamaica}} |{{flag|Mexico|1968}} |{{flag|Niger}} |{{flag|Norway}} |{{flag|Philippines|1936}} |{{flag|Portugal}} |{{flag|Tunisia}} |{{flag|Zambia|1964}} }} | 1981 = {{ubl |{{flag|East Germany}} |{{flag|Republic of Ireland|name=Ireland}} |{{flag|Japan|1947}} |{{flag|Mexico|1968}} |{{flag|Niger}} |{{flag|Panama}} |{{flag|Philippines|1936}} |{{flag|Spain|1977}} |{{flag|Tunisia}} |{{flag|Uganda}} }} | 1982 = {{ubl |{{flag|Guyana}} |{{flag|Republic of Ireland|name=Ireland}} |{{flag|Jordan}} |{{flag|Japan|1947}} |{{flag|Panama}} |{{flagcountry|Polish People's Republic}} |{{flag|Spain}} |{{flag|Togo}} |{{flag|Uganda}} |{{flag|Zaire}} }} | 1983 = {{ubl |{{flag|Guyana}} |{{flag|Jordan}} |{{flag|Malta}} |{{flag|Netherlands}} |{{flag|Nicaragua}} |{{flag|Pakistan}} |{{flagcountry|Polish People's Republic}} |{{flag|Togo}} |{{flag|Zaire}} |{{flag|Zimbabwe}} }} | 1984 = {{ubl |{{#ifexpr:({{{number|0}}})>=(554) and ({{{number|0}}})<=(559)|{{flag|Burkina Faso}} }} |{{#ifexpr:({{{number|0}}})>=(546) and ({{{number|0}}})<=(554)|{{flag|Egypt|1972}} }} {{#ifexpr:({{{number|0}}})>=(555) and ({{{number|0}}})<=(559)|{{flag|Egypt}} }} |{{flag|India}} |{{flag|Malta}} |{{flag|Netherlands}} |{{flag|Nicaragua}} |{{flag|Pakistan}} |{{flag|Peru}} |{{flag|Ukrainian SSR}} |{{#ifexpr:({{{number|0}}})>=(546) and ({{{number|0}}})<=(553)|{{flag|Upper Volta}} }} |{{flag|Zimbabwe}} }} | 1985 = {{ubl |{{flag|Australia}} |{{flag|Burkina Faso}} |{{flag|Denmark}} |{{flag|Egypt}} |{{flag|India}} |{{flag|Madagascar}} |{{flag|Peru}} |{{flag|Thailand}} |{{flag|Trinidad and Tobago}} |{{flag|Ukrainian SSR}} }} | 1986 = {{ubl |{{flag|Australia}} |{{flagcountry|People's Republic of Bulgaria}} |{{flag|People's Republic of the Congo|name=Rep. of the Congo}} |{{flag|Denmark}} |{{flag|Ghana}} |{{flag|Madagascar}} |{{flag|Thailand}} |{{flag|Trinidad and Tobago}} |{{flag|United Arab Emirates}} |{{flag|Venezuela|1954}} }} | 1987 = {{ubl |{{flag|Argentina}} |{{flagcountry|People's Republic of Bulgaria}} |{{flag|People's Republic of the Congo|name=Rep. of the Congo}} |{{flag|Ghana}} |{{flag|Italy}} |{{flag|Japan|1947}} |{{flag|United Arab Emirates}} |{{flag|Venezuela|1954}} |{{flag|West Germany}} |{{flag|Zambia|1964}} }} | 1988 = {{ubl |{{flag|Algeria}} |{{flag|Argentina}} |{{flag|Brazil|1968}} |{{flag|Italy}} |{{flag|Japan|1947}} |{{flag|Nepal}} |{{flag|Senegal}} |{{flag|West Germany}} |{{flag|Socialist Federal Republic of Yugoslavia|name=Yugoslavia}} |{{flag|Zambia|1964}} }} | 1989 = {{ubl |{{flag|Algeria}} |{{flag|Brazil|1968}} |{{flag|Canada}} |{{flag|Colombia}} |{{flag|Ethiopia|1987}} |{{flag|Finland}} |{{flag|Malaysia}} |{{flag|Nepal}} |{{flag|Senegal}} |{{flag|Socialist Federal Republic of Yugoslavia|name=Yugoslavia}} }} | 1990 = {{ubl |{{flag|Canada}} |{{flag|Colombia}} |{{flag|Cuba}} |{{flag|Ethiopia|1987}} |{{flag|Finland}} |{{flag|Ivory Coast}} |{{flag|Malaysia}} |{{flag|Romania}} |{{#ifexpr:({{{number|0}}})>=(647) and ({{{number|0}}})<=(654)|{{flag|South Yemen}} }} {{#ifexpr:({{{number|0}}})>=(655) and ({{{number|0}}})<=(683)|{{flag|Yemen}} }} |{{flag|Zaire}} }} | 1991 = {{ubl |{{flag|Austria}} |{{flag|Belgium}} |{{flag|Cuba}} |{{flag|Ecuador|1900}} |{{flag|India}} |{{flag|Ivory Coast}} |{{flag|Romania}} |{{flag|Yemen}} |{{flag|Zaire}} |{{flag|Zimbabwe}} }} | 1992 = {{ubl |{{flag|Austria}} |{{flag|Belgium}} |{{flag|Cape Verde}} |{{flag|Ecuador|1900}} |{{flag|Hungary}} |{{flag|India}} |{{flag|Japan|1947}} |{{flag|Morocco}} |{{flag|Venezuela|1954}} |{{flag|Zimbabwe}} }} | 1993 = {{ubl |{{flag|Brazil}} |{{flag|Cape Verde}} |{{flag|Djibouti}} |{{flag|Hungary}} |{{flag|Japan|1947}} |{{flag|Morocco}} |{{flag|New Zealand}} |{{flag|Pakistan}} |{{flag|Spain}} |{{flag|Venezuela|1954}} }} | 1994 = {{ubl |{{flag|Argentina}} |{{flag|Brazil}} |{{flag|Czech Republic}} |{{flag|Djibouti}} |{{flag|New Zealand}} |{{flag|Nigeria}} |{{flag|Oman|1970}} |{{flag|Pakistan}} |{{flag|Rwanda|1962}} |{{flag|Spain}} }} | 1995 = {{ubl |{{flag|Argentina}} |{{flag|Botswana}} |{{flag|Czech Republic}} |{{flag|Germany}} |{{flag|Honduras|1949}} |{{flag|Indonesia}} |{{flag|Italy}} |{{flag|Nigeria}} |{{flag|Oman}} |{{flag|Rwanda|1962}} }} | 1996 = {{ubl |{{flag|Botswana}} |{{flag|Chile}} |{{flag|Egypt}} |{{flag|Guinea-Bissau}} |{{flag|Germany}} |{{flag|Honduras|1949}} |{{flag|Indonesia}} |{{flag|Italy}} |{{flag|South Korea|1984}} |{{flag|Poland}} }} | 1997 = {{ubl |{{flag|Chile}} |{{flag|Costa Rica}} |{{flag|Egypt}} |{{flag|Guinea-Bissau}} |{{flag|Japan|1947}} |{{flag|Kenya}} |{{flag|South Korea|1984}} |{{flag|Poland}} |{{flag|Portugal}} |{{flag|Sweden}} }} | 1998 = {{ubl |{{flag|Bahrain|1972}} |{{flag|Brazil}} |{{flag|Costa Rica}} |{{flag|Gabon}} |{{flag|Gambia}} |{{flag|Japan|1947}} |{{flag|Kenya}} |{{flag|Portugal}} |{{flag|Slovenia}} |{{flag|Sweden}} }} | 1999 = {{ubl |{{flag|Argentina}} |{{flag|Bahrain|1972}} |{{flag|Brazil}} |{{flag|Canada}} |{{flag|Gabon}} |{{flag|Gambia}} |{{flag|Malaysia}} |{{flag|Namibia}} |{{flag|Netherlands}} |{{flag|Slovenia}} }} | 2000 = {{ubl |{{flag|Argentina}} |{{flag|Bangladesh}} |{{flag|Canada}} |{{flag|Jamaica}} |{{flag|Malaysia}} |{{flag|Mali}} |{{flag|Namibia}} |{{flag|Netherlands}} |{{flag|Tunisia}} |{{flag|Ukraine}} }} | 2001 = {{ubl |{{flag|Bangladesh}} |{{flag|Colombia}} |{{flag|Republic of Ireland|name=Ireland}} |{{flag|Jamaica}} |{{flag|Mali}} |{{flag|Mauritius}} |{{flag|Norway}} |{{flag|Singapore}} |{{flag|Tunisia}} |{{flag|Ukraine}} }} | 2002 = {{ubl |{{flag|Bulgaria}} |{{flag|Cameroon}} |{{flag|Colombia}} |{{flag|Guinea}} |{{flag|Republic of Ireland|name=Ireland}} |{{flag|Mauritius}} |{{flag|Mexico|1968}} |{{flag|Norway}} |{{flag|Singapore}} |{{flag|Syria}} }} | 2003 = {{ubl |{{flag|Angola}} |{{flag|Bulgaria}} |{{flag|Chile}} |{{flag|Cameroon}} |{{flag|Germany}} |{{flag|Guinea}} |{{flag|Mexico|1968}} |{{flag|Pakistan}} |{{flag|Spain}} |{{flag|Syria}} }} | 2004 = {{ubl |{{flag|Algeria}} |{{flag|Angola}} |{{flag|Benin}} |{{flag|Brazil}} |{{flag|Chile}} |{{flag|Germany}} |{{flag|Pakistan}} |{{flag|Philippines}} |{{flag|Romania}} |{{flag|Spain}} }} | 2005 = {{ubl |{{flag|Algeria}} |{{flag|Argentina}} |{{flag|Benin}} |{{flag|Brazil}} |{{flag|Denmark}} |{{flag|Greece}} |{{flag|Japan}} |{{flag|Philippines}} |{{flag|Romania}} |{{flag|Tanzania}} }} | 2006 = {{ubl |{{flag|Argentina}} |{{flag|Republic of the Congo|name=Rep. of the Congo}} |{{flag|Denmark}} |{{flag|Ghana}} |{{flag|Greece}} |{{flag|Japan}} |{{flag|Peru}} |{{flag|Qatar}} |{{flag|Slovakia}} |{{flag|Tanzania}} }} | 2007 = {{ubl |{{flag|Belgium}} |{{flag|Republic of the Congo|name=Rep. of the Congo}} |{{flag|Ghana}} |{{flag|Indonesia}} |{{flag|Italy}} |{{flag|Panama}} |{{flag|Peru}} |{{flag|Qatar}} |{{flag|South Africa|1994}} |{{flag|Slovakia}} }} | 2008 = {{ubl |{{flag|Burkina Faso}} |{{flag|Belgium}} |{{flag|Costa Rica}} |{{flag|Croatia}} |{{flag|Indonesia}} |{{flag|Italy}} |{{flag|Libya|1977}} |{{flag|Panama}} |{{flag|South Africa|1994}} |{{flag|Vietnam}} }} | 2009 = {{ubl |{{flag|Austria}} |{{flag|Burkina Faso}} |{{flag|Costa Rica}} |{{flag|Croatia}} |{{flag|Japan}} |{{flag|Libya|1977}} |{{flag|Mexico|1968}} |{{flag|Turkey}} |{{flag|Uganda}} |{{flag|Vietnam}} }} | 2010 = {{ubl |{{flag|Austria}} |{{flag|Bosnia and Herzegovina|name=Bosnia–Herzegovina}} |{{flag|Brazil}} |{{flag|Gabon}} |{{flag|Japan}} |{{flag|Lebanon}} |{{flag|Mexico|1968}} |{{flag|Nigeria}} |{{flag|Turkey}} |{{flag|Uganda}} }} | 2011 = {{ubl |{{flag|Bosnia and Herzegovina|name=Bosnia–Herzegovina}} |{{flag|Brazil}} |{{flag|Colombia}} |{{flag|Germany}} |{{flag|Gabon}} |{{flag|India}} |{{flag|Lebanon}} |{{flag|Nigeria}} |{{flag|Portugal}} |{{flag|South Africa|1994}} }} | 2012 = {{ubl |{{flag|Azerbaijan}} |{{flag|Colombia}} |{{flag|Germany}} |{{flag|Guatemala}} |{{flag|India}} |{{flag|Morocco}} |{{flag|Pakistan}} |{{flag|Portugal}} |{{flag|South Africa|1994}} |{{flag|Togo}} }} | 2013 = {{ubl |{{flag|Argentina}} |{{flag|Australia}} |{{flag|Azerbaijan}} |{{flag|Guatemala}} |{{flag|South Korea}} |{{flag|Luxembourg}} |{{flag|Morocco}} |{{flag|Pakistan}} |{{flag|Rwanda}} |{{flag|Togo}} }} | 2014 = {{ubl |{{flag|Argentina}} |{{flag|Australia}} |{{flag|Chad}} |{{flag|Chile}} |{{flag|Jordan}} |{{flag|Lithuania}} |{{flag|Luxembourg}} |{{flag|Nigeria}} |{{flag|Rwanda}} |{{flag|South Korea}} }} | 2015 = {{ubl |{{flag|Angola}} |{{flag|Chad}} |{{flag|Chile}} |{{flag|Jordan}} |{{flag|Lithuania}} |{{flag|Malaysia}} |{{flag|New Zealand}} |{{flag|Nigeria}} |{{flag|Spain}} |{{flag|Venezuela}} }} | 2016 = {{ubl |{{flag|Angola}} |{{flag|Egypt}} |{{flag|Japan}} |{{flag|Malaysia}} |{{flag|New Zealand}} |{{flag|Senegal}} |{{flag|Spain}} |{{flag|Ukraine}} |{{flag|Uruguay}} |{{flag|Venezuela}} }} | 2017 = {{ubl |{{flag|Bolivia}} |{{flag|Egypt}} |{{flag|Ethiopia}} |{{flag|Italy}} |{{flag|Japan}} |{{flag|Kazakhstan}} |{{flag|Senegal}} |{{flag|Sweden}} |{{flag|Ukraine}} |{{flag|Uruguay}} }} | 2018 = {{ubl |{{flag|Bolivia}} |{{flag|Equatorial Guinea}} |{{flag|Ethiopia}} |{{flag|Ivory Coast}} |{{flag|Kazakhstan}} |{{flag|Kuwait}} |{{flag|Netherlands}} |{{flag|Peru}} |{{flag|Poland}} |{{flag|Sweden}} }} | 2019 = {{ubl |{{flag|Belgium}} |{{flag|Dominican Republic}} |{{flag|Equatorial Guinea}} |{{flag|Germany}} |{{flag|Indonesia}} |{{flag|Ivory Coast}} |{{flag|Kuwait}} |{{flag|Peru}} |{{flag|Poland}} |{{flag|South Africa}} }} | 2020 = {{ubl |{{flag|Belgium}} |{{flag|Dominican Republic}} |{{flag|Estonia}} |{{flag|Germany}} |{{flag|Indonesia}} |{{flag|Niger}} |{{flag|Saint Vincent and the Grenadines|name=St.Vincent–Grenadines}} |{{flag|South Africa}} |{{flag|Tunisia}} |{{flag|Vietnam}} }} | 2021 = {{ubl |{{flag|Estonia}} |{{flag|India}} |{{flag|Ireland}} |{{flag|Kenya}} |{{flag|Mexico}} |{{flag|Niger}} |{{flag|Norway}} |{{flag|Saint Vincent and the Grenadines|name=St.Vincent–Grenadines}} |{{flag|Tunisia}} |{{flag|Vietnam}} }} | 2022 = {{ubl |{{flag|Albania}} |{{flag|Brazil}} |{{flag|Gabon}} |{{flag|Ghana}} |{{flag|India}} |{{flag|Ireland}} |{{flag|Kenya}} |{{flag|Mexico}} |{{flag|Norway}} |{{flag|United Arab Emirates}} }} | 2023 = {{ubl |{{flag|Albania}} |{{flag|Brazil}} |{{flag|Ecuador}} |{{flag|Gabon}} |{{flag|Ghana}} |{{flag|Japan}} |{{flag|Malta}} |{{flag|Mozambique}} |{{flag|Switzerland}} |{{flag|United Arab Emirates}} }} | #default = {{#ifeq:{{BASEPAGENAME}}|Infobox UN resolution |{{longitem|''automatically filled<br/>according to year''}} }} }} }} }}</includeonly>{{#invoke:Check for unknown parameters | check | unknown={{main other|[[Category:Pages using infobox UN resolution with unknown parameters|_VALUE_{{PAGENAME}}]]}} | preview=Page using [[Template:Infobox UN resolution]] with unknown parameter "_VALUE_" | ignoreblank=y | absent | abstention | against | alt | caption | code | date | document | for | image | image_alt | image_size | meeting | number | organ | presentnotvoting | result | subject | votemap | votemap_alt | votemap_size | width | year }}<noinclude>{{Documentation}}</noinclude> f110944eee6306518ca0e38b14a94836f6d895ff Template:Auto short description 10 130 323 322 2022-08-01T11:02:58Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Auto_short_description]] wikitext text/x-wiki {{Ombox | type = notice | text = This template {{#if:{{{sometimes|}}}|sometimes{{sp}}}}adds an automatically generated '''[[Wikipedia:Short description|short description]]'''{{#if:{{{category|}}}|{{sp}}({{{category}}})|}}{{#if:{{{conditions|}}}|{{space}}{{{conditions}}}}}. If the automatic short description is not optimal, replace it by adding {{tl|Short description}} at the top of the article. }}<includeonly>{{Subpage other|<!-- do not categorise -->|[[Category:Templates that generate short descriptions{{#if:{{{category|}}}|{{sp}}for {{{category}}}|}}]]}}</includeonly><noinclude> {{Documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 4ef114404749d204ef6574916944eb2d8478640e Template:Color 10 131 325 324 2022-08-01T11:02:59Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Color]] wikitext text/x-wiki <span style="color:{{{1|}}}">{{{2|{{{1|}}}}}}</span><noinclude>{{Documentation}}<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --></noinclude> f12cd387c0d5c11494a7182b7538cc3292eb3a4a Template:Country data Bolivia 10 132 327 326 2022-08-01T11:03:00Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Bolivia]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Bolivia | flag alias = Bandera de Bolivia (Estado).svg | flag alias-state = Bandera de Bolivia (Estado).svg | flag alias-football = Bandera de Bolivia (Estado).svg | flag alias-spain = Flag of Cross of Burgundy.svg | flag alias-1825 = State flag of Bolivia (1825-1826).svg | flag alias-1825a = Civil flag of Bolivia (1825-1826).svg | flag alias-1831 = Flag of Bolivia (state, 1826-1851).svg | flag alias-1831a = Flag of Bolivia (1826-1851).svg | flag alias-confederation = Flag of the Peru-Bolivian Confederation.svg | flag alias-wiphala = Banner of the Qulla Suyu.svg | flag alias-patuju = | flag alias-army=Flag of Bolivia (military).svg | link alias-army=Bolivian Army | flag alias-air force=Flag of Bolivia (military).svg | link alias-air force=Bolivian Air Force | flag alias-naval = Naval Ensign of Bolivia.svg | link alias-naval = Bolivian Naval Force | flag alias-naval old = Naval Ensign of Bolivia (1966-2013).svg | flag alias-naval jack = Naval Jack of Bolivia.svg | flag alias-military = Flag of Bolivia (military).svg | link alias-military = Bolivian Armed Forces | flag alias-navy = Naval Ensign of Bolivia.svg | link alias-navy = Bolivian Naval Force | flag alias-civil = Flag of Bolivia.svg | size = {{{size|}}} | name = {{{name|}}} | altvar = {{{altvar|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = state | var2 = football | var3 = spain | var4 = 1825 | var5 = 1825a | var6 = 1831 | var7 = 1831a | var8 = confederation | var9 = wiphala | var10 = patuju | var11 = naval old | var12 = naval jack | var13 = civil | redir1 = BOL </noinclude> }} 369ece052134be958349df9e20f2620b87127dba Template:Country data Bosnia and Herzegovina 10 133 329 328 2022-08-01T11:03:00Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Bosnia_and_Herzegovina]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Bosnia and Herzegovina | flag alias = Flag of Bosnia and Herzegovina.svg | flag alias-1992 = Flag of Bosnia and Herzegovina (1992–1998).svg | link alias-army = Bosnian Ground Forces | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1992 | redir1 = BIH | redir2 = Bosnia-Herzegovina | related1 = SR Bosnia and Herzegovina | related2 = Republika Srpska | related3 = Federation of Bosnia and Herzegovina </noinclude> }} cbecdd0b7dbc4b5254ec8654d57eaa2eb15a03bc Template:Country data Brazil 10 134 331 330 2022-08-01T11:03:01Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Brazil]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Brazil | flag alias-1692 = Flag of the Princes of Brazil.svg | flag alias-1816 = Flag of the United Kingdom of Portugal, Brazil, and the Algarves.svg | flag alias-1822 = Flag of Brazil (1822–1870).svg | flag alias-1870 = Flag of Brazil (1870–1889).svg | flag alias = Flag of Brazil.svg | flag alias-1889 = Flag of Brazil (1889–1960).svg | flag alias-1960 = Flag of Brazil (1960–1968).svg | flag alias-1968 = Flag of Brazil (1968–1992).svg | flag alias-army = Flag of the Brazilian Army.png | link alias-army = Brazilian Army | flag alias-air force = Brazilian Air Force fin flash.svg | link alias-air force = Brazilian Air Force | link alias-naval = Brazilian Navy | flag alias-marines=Flag of the Brazilian Marine Corps.svg | link alias-marines=Brazilian Marine Corps | link alias-military = Brazilian Armed Forces | link alias-navy = Brazilian Navy | flag alias-navy = Flag of the Brazilian Navy.svg | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1692 | var2 = 1816 | var3 = 1822 | var4 = 1870 | var5 = 1889 | var6 = 1960 | var7 = 1968 | redir1 = BRA | redir2 = Federative Republic of Brazil | related1 = Empire of Brazil | related2 = Brazilian military government | related3 = First Brazilian Republic | related4 = Second Brazilian Republic | related5 = Vargas Era </noinclude> }} efef2331121dff90ef20e45117c2867e0ac93dcd Template:Country data China 10 135 333 332 2022-08-01T11:03:01Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_China]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = China | flag alias = Flag of the People's Republic of China.svg | flag alias-1862 = Flag of the Qing Dynasty (1862-1889).svg | border-1862 = | flag alias-1889 = Flag of the Qing Dynasty (1889-1912).svg | flag alias-Qing = Flag of the Qing Dynasty (1889-1912).svg | flag alias-1912 = Flag of China (1912–1928).svg | flag alias-1928 = Flag of the Republic of China.svg | flag alias-military = People's Liberation Army Flag of the People's Republic of China.svg | link alias-military = People's Liberation Army | flag alias-coast guard=Flag of China.svg | link alias-coast guard=China Coast Guard | flag alias-army = Ground Force Flag of the People's Republic of China.svg | link alias-army = People's Liberation Army Ground Force | flag alias-marines=Naval ensign of China.svg | link alias-marines=People's Liberation Army Navy Marine Corps | flag alias-navy = Naval ensign of China.svg | link alias-navy = People's Liberation Army Navy | flag alias-naval = Naval ensign of China.svg | link alias-naval = People's Liberation Army Navy | flag alias-air force = Air Force Flag of the People's Republic of China.svg | link alias-air force = People's Liberation Army Air Force | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | altvar = {{{altvar|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1862 | var2 = 1889 | var3 = 1912 | var4 = 1928 | redir1 = CHN | redir2 = People's Republic of China | redir3 = China, People's Republic of | redir4 = China (People's Republic of) | redir5 = PRC | related1 = Qing dynasty | related2 = Republic of China | related3 = Republic of China (1912–1949) </noinclude> }} a78d324a5b210f7474f249ada57c4c17c25d25b9 Template:Country data Colombia 10 136 335 334 2022-08-01T11:03:02Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Colombia]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Colombia | flag alias = Flag of Colombia.svg | flag alias-1861 = Flag of Colombia (WFB 2013).gif | flag alias-2004 = Flag of Colombia (2004 World Factbook).gif | flag alias-civil = Civil Ensign of Colombia.svg | flag alias-naval = Naval Ensign of Colombia.svg | link alias-naval = Colombian National Navy | flag alias-army = Flag of the Colombian Army.svg | link alias-army = Colombian National Army | flag alias-air force = Flag of the Colombian Air Force.svg | link alias-air force = Colombian Air Force | flag alias-marines=Flag of the Colombian Naval Infantry.png | link alias-marines=Colombian Naval Infantry | link alias-navy = Colombian National Navy | flag alias-navy = Flag of the Colombian Navy.png | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1861 | var2 = 2004 | var3 = civil | redir1 = COL </noinclude> }} 39587c424da5a5f0c766a5a1742678a027dad3aa Template:Country data Egypt 10 137 337 336 2022-08-01T11:03:02Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Egypt]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Egypt | flag alias = Flag of Egypt.svg | flag alias-Ottoman = Flag of Egypt (1793-1844).svg | flag alias-1882 = Flag of Egypt (1882-1922).svg | flag alias-1922 = Flag of Egypt (1922–1958).svg | flag alias-1952 = Flag of Egypt (1952-1958).svg | flag alias-1958 = Flag of the United Arab Republic.svg | flag alias-1972 = Flag of Egypt (1972-1984).svg | link alias-military = Egyptian Armed Forces | flag alias-army = Flag of the Army of Egypt.svg | link alias-army = Egyptian Army | flag alias-naval = Naval Ensign of Egypt.svg | link alias-naval = Egyptian Navy | flag alias-navy=Flag of the Egyptian Navy.svg | link alias-navy=Egyptian Navy | flag alias-air force = Eafflag.svg | link alias-air force = Egyptian Air Force | flag alias-air defence force = Flag of the Egyptian Air Defense Forces.svg | link alias-air defence force = Egyptian Air Defense Forces | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = Ottoman | var2 = 1882 | var3 = 1922 | var4 = 1952 | var5 = 1958 | var6 = 1972 | var7 = air defence force | redir1 = EGY | related1 = United Arab Republic </noinclude> }} c5e959f0c9cc5aac05dc43da1f663fe0b9cf3a19 Template:Country data Ethiopia 10 138 339 338 2022-08-01T11:03:03Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Ethiopia]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Ethiopia | flag alias = Flag of Ethiopia.svg | flag alias-1897 = Flag of Ethiopia (1897-1936; 1941-1974).svg | flag alias-1975 = Flag of Ethiopia (1975–1987).svg | flag alias-1975-state = Flag of Ethiopia (1975–1987) (02).svg | flag alias-1987 = Flag of Ethiopia (1987-1991).svg | flag alias-1991 = Flag of Ethiopia (1991-1996).svg | flag alias-1996 = Flag of Ethiopia (1996-2009).svg | flag alias-naval = Flag of Ethiopia (1975–1987).svg | link alias-naval = Ethiopian Navy | link alias-air force = Ethiopian Air Force | flag alias-air force = Ethiopian Air Force flag.svg | link alias-army = Ethiopian Ground Forces | flag alias-navy = Flag of Ethiopia (1975–1987).svg | link alias-navy = Ethiopian Navy | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1897 | var2 = 1975 | var3 = 1975-state | var4 = 1987 | var5 = 1991 | var6 = 1996 | redir1 = ETH | related1 = Ethiopian Empire </noinclude> }} 1d9b0cf28e53e65a036039cf3c34693b1e47cd4d Template:Country data France 10 139 341 340 2022-08-01T11:03:04Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_France]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = France | flag alias = Flag of France.svg | flag alias-1790 = Flag of France (1790–1794).svg | flag alias-1794 = Flag of France (1794–1815, 1830–1958).svg | flag alias-1814 = Royal flag of France during the Bourbon Restoration.svg | flag alias-1830 = Flag of France (1794–1815, 1830–1958).svg | flag alias-1848 = Drapeau france 1848.svg | flag alias-1848a = Drapeau france 1848.svg | flag alias-1848b = Flag of France (1794–1815, 1830–1958).svg | flag alias-1974 = Flag of France (lighter variant).svg | flag alias-naval = Civil and Naval Ensign of France.svg | flag alias-naval-1790 = Flag of French-Navy-Revolution.svg | flag alias-air force = Flag of France.svg | link alias-air force = French Air and Space Force | flag alias-coast guard = French Maritime Gendarmerie racing stripe.svg | border-coast guard = | link alias-coast guard = French Maritime Gendarmerie | flag alias-army = Flag of France.svg | link alias-army = French Army | link alias-naval = French Navy | flag alias-navy = Civil and Naval Ensign of France.svg | link alias-navy = French Navy | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1790 | var2 = 1794 | var3 = 1814 | var4 = 1830 | var5 = 1848a | var6 = 1848b | var7 = 1974 | var8 = naval-1790 | redir1 = FRA | related1 = Kingdom of France | related2 = Free France </noinclude> }} 8afff5d797339e01eef025cd5e147c2d2f943a0f Template:Country data Gabon 10 140 343 342 2022-08-01T11:03:04Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Gabon]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Gabon | flag alias = Flag of Gabon.svg | flag alias-1959 = Flag of Gabon 1959-1960.svg | link alias-naval = Gabonese Navy | link alias-air force = Gabonese Air Force | link alias-army = Gabonese Army | link alias-navy = Gabonese Navy | size = {{{size|}}} | name = {{{name|}}} | variant = {{{variant|}}} | altlink = {{{altlink|}}} <noinclude> | redir1 = GAB | var1 = 1959 </noinclude> }} 81019b1525232911a87962d5ac2eefadb45b5b4a Template:Country data Germany 10 141 345 344 2022-08-01T11:03:05Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Germany]] wikitext text/x-wiki {{safesubst<noinclude />: {{{1<noinclude>|country showdata</noinclude>}}} | alias = Germany | flag alias = Flag of Germany.svg | flag alias-1866 = Flag of the German Empire.svg | link alias-1866 = German Empire | flag alias-empire = Flag of the German Empire.svg | link alias-empire = German Empire | flag alias-1919 = Flag of Germany (3-2 aspect ratio).svg | link alias-1919 = Weimar Republic | flag alias-Weimar = Flag of Germany (3-2 aspect ratio).svg | link alias-Weimar = Weimar Republic | flag alias-1933 = Flag of Germany (1933-1935).svg | flag alias-1935 = Flag of Germany (1935–1945).svg | link alias-1935 = Nazi Germany | flag alias-Nazi = Flag of Germany (1935–1945).svg | link alias-Nazi = Nazi Germany | flag alias-1946 = Merchant flag of Germany (1946–1949).svg | border-1946 = | flag alias-1949 = Flag of Germany.svg | flag alias-EUA = German Olympic flag (1959-1968).svg | flag alias-gold = Flag of West Germany; Flag of Germany (1990–1996).svg | flag alias-state = Flag of Germany (state).svg | flag alias-naval = Naval Ensign of Germany.svg | border-naval = | link alias-naval = German Navy | flag alias-coast guard=German Federal Coast Guard racing stripe.svg | border-coast guard= | link alias-coast guard=German Federal Coast Guard | flag alias-army = Colour of Germany.svg | flag alias-air force =Flag of Germany (state).svg | link alias-air force = German Air Force | link alias-army = German Army | flag alias-navy = Naval Ensign of Germany.svg | link alias-navy = German Navy | border-army= | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1866 | var2 = empire | var3 = 1919 | var4 = Weimar | var5 = 1933 | var6 = 1935 | var7 = Nazi | var8 = 1946 | var9 = 1949 | var10 = EUA | var11 = gold | var12 = state | redir1 = DEU | redir2 = GER | related1 = German Empire | related2 = Weimar Republic | related3 = Nazi Germany | related4 = Allied-occupied Germany | related5 = East Germany | related6 = West Germany </noinclude> }} 9275a41a1d28ccc5f85b3aff4915ff95112ef25e Template:Country data India 10 142 347 346 2022-08-01T11:03:05Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_India]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = India | flag alias = Flag of India.svg | flag alias-British = British Raj Red Ensign.svg | flag alias-1931 = 1931 Flag of India.svg | flag alias-civil = Civil Ensign of India.svg | flag alias-army = Flag of Indian Army.svg | link alias-army = Indian Army | flag alias-naval = Naval Ensign of India.svg | flag alias-air force = Air Force Ensign of India.svg | flag alias-coast guard = Indian Coast Guard flag.svg | link alias-coast guard = Indian Coast Guard | link alias-naval = Indian Navy | link alias-air force = Indian Air Force | flag alias-navy = Naval Ensign of India.svg | link alias-navy = Indian Navy | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = British | var2 = 1931 | var4 = civil | redir1 = IND | related1 = British Raj | related2 = Dominion of India </noinclude> }} 4e77fe6241ffe394cd01006ad4972108fb4f5f33 Template:Country data Italy 10 143 349 348 2022-08-01T11:03:06Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Italy]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Italy | flag alias = Flag of Italy.svg | flag alias-1861 = Flag of Italy (1861–1946).svg | flag alias-1943 = War flag of the Italian Social Republic.svg | flag alias-2003 = Flag of Italy (2003–2006).svg | flag alias-civil = Civil Ensign of Italy.svg | flag alias-naval = Naval Ensign of Italy.svg | flag alias-navy-1947 = Naval Ensign of Italy (1947-2013).svg | link alias-naval = Italian Navy | link alias-air force = Italian Air Force | link alias-army = Italian Army | flag alias-navy = Naval Ensign of Italy.svg | link alias-navy = Italian Navy | link alias-roller hockey = Italy {{{mw}}} national roller hockey team | size = {{{size|}}} | name = {{{name|}}} | variant = {{{variant|}}} | altlink = {{{altlink|}}} | altvar = {{{altvar|}}} <noinclude> | var1 = 1861 | var2 = 1943 | var4 = 2003 | var5 = civil | var6 = navy-1947 | redir1 = ITA | related1 = Kingdom of Italy | related2 = Italian Social Republic | related3 = Napoleonic Italy </noinclude> }} 305bf5a66b74b7211326d9326b28d66a836e8721 Template:Country data Japan 10 144 351 350 2022-08-01T11:03:06Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Japan]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Japan | flag alias = Flag of Japan.svg | flag alias-1870 = Flag of Japan (1870-1999).svg | link alias-1870 = Empire of Japan | flag alias-1945 = Flag of Allied Occupied Japan.svg | border-1945 = | flag alias-1947 = Flag of Japan (1870-1999).svg | flag alias-ryukyu = Flag of US Occupied Ryukyu Islands.svg | border-ryukyu = | flag alias-naval = Naval Ensign of Japan.svg | flag alias-coast guard = Ensign of the Japanese Coast Guard.svg | link alias-coast guard = Japan Coast Guard | link alias-naval = Japan Maritime Self-Defense Force | flag alias-army = Flag of JSDF.svg | link alias-army = Japan Ground Self-Defense Force | flag alias-air force = Flag of the Japan Air Self-Defense Force.svg | link alias-air force = Japan Air Self-Defense Force | flag alias-air force-1955 = Flag of the Japan Air Self-Defense Force (1955-1957).png | link alias-air force-1955 = Japan Air Self-Defense Force | flag alias-air force-1957 = Flag of the Japan Air Self-Defense Force (1957-1972).png | link alias-air force-1957 = Japan Air Self-Defense Force | flag alias-air force-1972 = Flag of the Japan Air Self-Defense Force (1972-2001).png | link alias-air force-1972 = Japan Air Self-Defense Force | flag alias-military=Flag of the Japan Self-Defense Forces.svg | link alias-military=Japan Self-Defense Forces | flag alias-marines=Flag of JSDF.svg | link alias-marines=Japanese Amphibious Rapid Deployment Brigade | flag alias-navy = Naval Ensign of Japan.svg | link alias-navy = Japan Maritime Self-Defense Force | {{#ifeq:{{{altlink}}}|A national rugby union team|link alias-rugby union|empty}} = Junior Japan | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1870 | var2 = 1945 | var3 = 1947 | var4 = ryukyu | redir1 = JPN | related1 = Empire of Japan </noinclude> }} 1f2cfaba0a9252c2a5fba884e76d18c18b00418f Template:Country data Kazakhstan 10 145 353 352 2022-08-01T11:03:07Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Kazakhstan]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Kazakhstan | flag alias = Flag of Kazakhstan.svg | flag alias-1991 = Flag of the Kazakh SSR.svg | flag alias-1992 = Flag of Kazakhstan (1992).svg | flag alias-naval = Naval Ensign of Kazakhstan.svg | link alias-naval = Kazakh Naval Forces | flag alias-air force = Ensign of Kazakhstan Air Force.svg | link alias-air force = Kazakh Air Defense Forces | flag alias-army = Kazakhstan Armed Forces Flag.svg | link alias-army = Kazakh Ground Forces | flag alias-navy = Naval Ensign of Kazakhstan.svg | link alias-navy = Kazakh Naval Forces | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} | var1 = 1991 | var2 = 1992 <noinclude> | redir1 = KAZ | related1 = Kazakh SSR </noinclude> }} 770be6119a2f31c0af66781c3f5b131a6e3f20e7 Template:Country data Lebanon 10 146 355 354 2022-08-01T11:03:07Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Lebanon]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Lebanon | flag alias = Flag of Lebanon.svg | flag alias-air force = Flag of the Lebanese Air Force.svg | link alias-air force = Lebanese Air Force | flag alias-army = Lebanesearmyfirstflag.png | link alias-army = Lebanese Ground Forces | link alias-naval = Lebanese Navy | link alias-navy = Lebanese Navy | flag alias-1918 = Cedar flag.svg | flag alias-1920 = Lebanese French flag.svg | link alias-1920 = Greater Lebanon | size = {{{size|}}} | name = {{{name|}}} | variant = {{{variant|}}} | altlink = {{{altlink|}}} <noinclude> | var1 = 1918 | var2 = 1920 | redir1 = LBN | redir2 = LIB </noinclude> }} ff6b6bf3a567ba7b8e50a8e7684e8784ab99d411 Template:Country data Nigeria 10 147 357 356 2022-08-01T11:03:08Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Nigeria]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Nigeria | flag alias = Flag of Nigeria.svg | flag alias-colonial = Flag of Nigeria (1914–1952).svg | flag alias-naval = Naval Ensign of Nigeria.svg | link alias-naval = Nigerian Navy | flag alias-army = Flag of the Nigerian Army Headquarters.svg | link alias-army = Nigerian Army | flag alias-military=Flag of the Nigerian Armed Forces.svg | link alias-military=Nigerian Armed Forces | flag alias-air force = Air Force Ensign of Nigeria.svg | link alias-air force = Nigerian Air Force | flag alias-navy = Naval Ensign of Nigeria.svg | link alias-navy = Nigerian Navy | flag alias-civil = Civil Ensign of Nigeria.svg | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = colonial | var2 = civil | redir1 = NGA | redir2 = NGR </noinclude> }} 63a77faf3e62e78e1c41cfdb6d2fd883bf074739 Template:Country data Portugal 10 148 359 358 2022-08-01T11:03:08Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Portugal]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Portugal | flag alias = Flag of Portugal.svg | flag alias-1248 = PortugueseFlag1248.svg | flag alias-1385 = PortugueseFlag1385.svg | flag alias-1495 = Flag Portugal (1495).svg | flag alias-1578 = Flag Portugal (1578).svg | flag alias-1640 = Flag Portugal (1640).svg | flag alias-1707 = Flag Portugal (1707).svg | flag alias-1750 = Flag of Portugal (1750).svg | flag alias-1816 = Flag of the United Kingdom of Portugal, Brazil, and the Algarves.svg | flag alias-1830 = Flag Portugal (1830).svg | flag alias-civil = Flag Portugal sea (1830).svg | flag alias-air force=Portugal Air force fin flash.svg | flag alias-army = Military flag of Portugal.svg | link alias-air force = Portuguese Air Force | link alias-army = Portuguese Army | link alias-naval = Portuguese Navy | flag alias-navy=Naval Jack of Portugal.svg | link alias-navy = Portuguese Navy | flag alias-marines=Naval Jack of Portugal.svg | link alias-marines=Portuguese Marine Corps | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1248 | var2 = 1385 | var3 = 1495 | var4 = 1578 | var5 = 1640 | var6 = 1707 | var7 = 1750 | var8 = 1816 | var9 = 1830 | var13 = civil | redir1 = PRT | redir2 = POR | related1 = Portuguese Empire </noinclude> }} 208ba0708db45e46bb27b8b9f46d8c0b7b4bb9ed Template:Country data Russia 10 149 361 360 2022-08-01T11:03:09Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Russia]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Russia | flag alias = Flag of Russia.svg | flag alias-1668 = Flag of Russia (1668).svg | flag alias-1696 = Flag of Russia.svg | flag alias-1721 = Flag of Oryol (variant).svg | flag alias-1858 = Romanov Flag.svg | flag alias-1914 = Flag of Russian Empire (1914-1917).svg | flag alias-1918a=Flag of Russia (1918).svg | flag alias-1918 = Flag of Russia (1918–1920).svg | flag alias-1925 = Flag of the Russian SFSR (1920-1937).svg | flag alias-1937 = Flag of the Russian SFSR (1937-1954).svg | flag alias-1954 = Flag of the Russian SFSR.svg | flag alias-1991 = Flag of Russia (1991–1993).svg | flag alias-military = Banner of the Armed Forces of the Russian Federation (obverse).svg | link alias-military = Russian Armed Forces | flag alias-army = Flag of the Russian ground forces.svg | link alias-army = Russian Ground Forces | flag alias-naval = Naval Jack of Russia.svg | link alias-naval = Russian Navy | flag alias-navy = Naval Ensign of Russia.svg | link alias-navy = Russian Navy | flag alias-air force = Flag of the Air Force of the Russian Federation.svg | link alias-air force = Russian Air Force | flag alias-marines = Флаг Морской пехоты ВМФ России (2021).jpg | link alias-marines = Russian Naval Infantry | flag alias-space force = Russian military space troops flag.svg | link alias-space force = Russian Space Forces | flag alias-coast guard = Russia, Flag of border service 2008.svg | link alias-coast guard = Coast Guard of the Border Service of the FSB | flag alias-roc-olympics = Olympic flag.svg | flag alias-rpc-paralympics = Russian Paralympic Committee flag (2021).svg | flag alias-nbfr-badminton = Nbfr logo.png | flag alias-rwf-wrestling = RWF logo.svg | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1668 | var2 = 1696 | var3 = 1721 | var4 = 1858 | var5 = 1914 | var6 = 1918a | var7 = 1918 | var8 = 1925 | var9 = 1937 | var10 = 1954 | var11 = 1991 | var12 = roc-olympics | var13 = rpc-paralympics | var14 = nbfr-badminton | var15 = rwf-wrestling | redir1 = RUS | redir2 = Russian Federation </noinclude> }} 1c223d68d6a2b82b579c20c75800ebc6fa57e066 Template:Country data Senegal 10 150 363 362 2022-08-01T11:03:09Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Senegal]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Senegal | flag alias = Flag of Senegal.svg | link alias-air force = Senegalese Air Force | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} <noinclude> | redir1 = SEN </noinclude> }} 4e28b333600411f6b24786882c954a6b3b441721 Template:Country data South Africa 10 151 365 364 2022-08-01T11:03:10Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_South_Africa]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = South Africa | flag alias = Flag of South Africa.svg | flag alias-1795 = Flag of Great Britain (1707–1800).svg | flag alias-1801 = Flag of the United Kingdom.svg | flag alias-1857 = Flag of Transvaal.svg | flag alias-1875 = Flag of the Natal Colony (1875–1910).svg | flag alias-1876 = Flag of the Cape Colony 1876-1910.svg | flag alias-1902 = Flag of Orange River Colony.svg | flag alias-1910 = South Africa Flag 1910-1912.svg | flag alias-1912 = Red Ensign of South Africa (1912-1951).svg | flag alias-1928 = Flag of South Africa (1928–1994).svg | flag alias-1982 = Flag of South Africa (1982–1994).svg | flag alias-naval = Naval Ensign of South Africa.svg | flag alias-naval-1922 = Naval Ensign of the United Kingdom.svg | flag alias-naval-1946 = Naval Ensign of South Africa (1946-1951).svg | flag alias-naval-1951 = Naval Ensign of South Africa (1951-1952).svg | flag alias-naval-1952 = Naval Ensign of South Africa (1952-1981).svg | flag alias-naval-1981 = Naval Ensign of South Africa (1981-1994).svg | flag alias-marines=Naval Ensign of South Africa.svg | link alias-marines=South African Maritime Reaction Squadron | link alias-naval = South African Navy | flag alias-air force = Ensign of the South African Air Force.svg | flag alias-air force-1940 = Ensign of the South African Air Force 1940-1951.svg | flag alias-air force-1951 = Ensign of the South African Air Force 1951-1958.svg | flag alias-air force-1958 = Ensign of the South African Air Force (1958-1967, 1970-1981).svg | flag alias-air force-1967 = Ensign of the South African Air Force 1967-1970.svg | flag alias-air force-1981 = Ensign of the South African Air Force 1981-1982.svg | flag alias-air force-1982 = Ensign of the South African Air Force (1982-1994).svg | flag alias-air force-1994 = Ensign of the South African Air Force 1994-2003.svg | link alias-air force = South African Air Force | flag alias-army = Flag of the South African Army.svg | flag alias-army-1951 = Flag of the South African Army (1951–1966).png | flag alias-army-1966 = Flag of the South African Army (1966–1973).png | flag alias-army-1973 = Flag of the South African Army (1973–1994).svg | flag alias-army-1981 = Ensign of the South African Defence Force (1981-1994).svg | flag alias-army-1994 = Flag of the South African Army (1994–2002).svg | flag alias-army-2002 = Flag of the South African Army (2002–2003).svg | link alias-army = South African Army | flag alias-military = Flag of the South African National Defence Force.svg | link alias-military = South African National Defence Force | flag alias-navy = Naval Ensign of South Africa.svg | link alias-navy = South African Navy | link alias-football = South Africa {{{mw|}}} national {{{age|}}} soccer {{{class|}}} team | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | altvar = {{{altvar|}}} | variant = {{{variant|}}} <noinclude> | var1= 1795 | var2= 1801 | var3= 1857 | var4= 1875 | var5= 1876 | var6 = 1902 | var7 = 1910 | var8 = 1912 | var9 = 1928 | var10 = 1982 | var11 = naval-1922 | var12 = naval-1946 | var13 = naval-1952 | var14 = naval-1981 | var15 = air force-1940 | var16 = air force-1951 | var17 = air force-1958 | var18 = air force-1967 | var19 = air force-1981 | var20 = air force-1982 | var21 = air force-1994 | var22 = army-1951 | var23 = army-1966 | var24 = army-1973 | var25 = army-1981 | var26 = army-1994 | var27 = army-2002 | redir1 = ZAF | redir2 = RSA | related1 = South African Republic | related2 = Union of South Africa | related3 = Cape Colony </noinclude> }} fdde0b214de19a2be526de95c075934bb8997dd9 Template:Country data Sweden 10 152 367 366 2022-08-01T11:03:10Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Sweden]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Sweden | flag alias = Flag of Sweden.svg | flag alias-army = Naval Ensign of Sweden.svg | flag alias-air force =Naval Ensign of Sweden.svg | flag alias-1562 = Sweden-Flag-1562.svg | border-1562 = | flag alias-1818 = Swedish and Norwegian merchant flag 1818-1844.svg | flag alias-1844 = Swedish civil ensign (1844–1905).svg | flag alias-naval = Naval Ensign of Sweden.svg | flag alias-naval-1844 = Naval Ensign of Sweden (1844-1905).svg | flag alias-naval-1815 = Swedish and Norwegian naval ensign (1815-1844).svg | link alias-army = Swedish Army | border-army= | border-air force= | link alias-air force = Swedish Air Force | border-naval = | link alias-naval = Swedish Navy | flag alias-navy = Naval Ensign of Sweden.svg | link alias-navy = Swedish Navy | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | altvar = {{{altvar|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1562 | var2 = 1818 | var3 = 1844 | var4 = naval-1844 | var5 = naval-1815 | redir1 = SWE </noinclude> }} deecf04263a2227ef046b62b52f74afe0bf8e624 Template:Country data Ukraine 10 153 369 368 2022-08-01T11:03:11Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Ukraine]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Ukraine | flag alias = Flag of Ukraine.svg | flag alias-1918 = Flag of Ukrainian People's Republic 1917.svg | flag alias-1991 = Flag of the Ukrainian Soviet Socialist Republic.svg | flag alias-1992 = Flag of Ukraine (1992–2006).svg | flag alias-army = Ensign of the Ukrainian Ground Forces.svg | flag alias-military=Ensign of the Ukrainian Armed Forces.svg | link alias-military=Ukrainian Armed Forces | flag alias-marines=Flag of the Ukrainian Naval Infantry.png | link alias-marines=Ukrainian Naval Infantry | link alias-army = Ukrainian Ground Forces | flag alias-coast guard=Sea Guard Ensign of Ukraine (dress).svg | link alias-coast guard=Ukrainian Sea Guard | flag alias-naval = Naval Ensign of Ukraine.svg | flag alias-naval-1918 = Naval Ensign of Ukraine 1918 July.svg | link alias-naval = Ukrainian Navy | flag alias-air force = Ensign of the Ukrainian Air Force.svg | link alias-air force = Ukrainian Air Force | flag alias-navy = Naval Ensign of Ukraine.svg | link alias-navy = Ukrainian Navy | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1918 | var2 = naval-1918 | var3 = 1991 | var4 = 1992 | redir1 = UKR | related1 = Zaporozhian Sich | related2 = Cossack Hetmanate | related3 = Ukrainian People's Republic | related4 = West Ukrainian People's Republic | related5 = Ukrainian People's Republic of Soviets | related6 = Ukrainian Soviet Republic | related7 = Ukrainian SSR | related8 = Carpatho-Ukraine | related9 = Ukrainian National Government </noinclude> }} e83720792814b2f02e044f3f60a1617471d9f569 Template:Country data United Kingdom 10 154 371 370 2022-08-01T11:03:12Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_United_Kingdom]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = United Kingdom | flag alias = Flag of the United Kingdom.svg | flag alias-civil = Civil Ensign of the United Kingdom.svg | flag alias-civil-air = Civil Air Ensign of the United Kingdom.svg | flag alias-government = Government Ensign of the United Kingdom.svg | flag alias-naval = Naval Ensign of the United Kingdom.svg | flag alias-naval-RFA = British-Royal-Fleet-Auxiliary-Ensign.svg | flag alias-naval-RMAS = British Royal Maritime Auxiliary Ensign.svg | flag alias-naval-GS = Government Service Ensign.svg | flag alias-naval-RNLI = Flag of the Royal National Lifeboat Institution.svg | link alias-naval-RNLI = Royal National Lifeboat Institution | flag alias-1707 = Flag of Great Britain (1707–1800).svg | link alias-naval-1707 = Royal Navy | flag alias-naval-reserve = Naval Ensign of the United Kingdom.svg | flag alias-naval-merchant = Civil Ensign of the United Kingdom.svg | link alias-naval = {{#switch:{{{variant|}}}|naval-RFA|RFA=Royal Fleet Auxiliary|naval-RMAS|RMAS=Royal Maritime Auxiliary Service|naval-RNLI|RNLI=Royal National Lifeboat Institution|naval-reserve|reserve=Royal Naval Reserve|naval-merchant|merchant=Merchant Navy (United Kingdom){{!}}Merchant Navy|#default=Royal Navy}} | flag alias-naval-1707 = Naval ensign of Great Britain (1707–1800).svg | flag alias-air force = Ensign of the Royal Air Force.svg | link alias-air force = Royal Air Force | flag alias-army = Flag of the British Army.svg | link alias-army = British Army | flag alias-military = Flag of the United Kingdom (3-5).svg | link alias-military = British Armed Forces | flag alias-marines = Flag of the Royal Marines.svg | link alias-marines = Corps of Royal Marines | flag alias-coast guard = Flag of Her Majesty's Coastguard.svg | link alias-coast guard = Her Majesty's Coastguard | flag alias-navy = Naval Ensign of the United Kingdom.svg | link alias-navy = Royal Navy | size = {{{size|}}} | name = {{#ifeq:{{{name|}}}|Britain|United Kingdom|{{{name|}}}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = civil | var2 = government | var3 = naval-RFA | var4 = naval-RMAS | var5 = naval-RNLI | var6 = 1707 | var7 = civil-air | redir1 = UK | redir2 = U.K. | redir3 = the United Kingdom | related1 = Great Britain | related2 = Kingdom of Great Britain | related3 = British Empire | related4 = United Kingdom of Great Britain and Ireland | related5 = Kingdom of England | related6 = Kingdom of Scotland </noinclude> }} 6b40c4fb81cb83acc109c4a8d621c25ba0bdd0b6 Template:Country data United States 10 155 373 372 2022-08-01T11:03:12Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_United_States]] wikitext text/x-wiki {{safesubst<noinclude />: {{{1<noinclude>|country showdata</noinclude>}}} | alias = United States | flag alias = Flag of the United States.svg | flag alias-1776 = Flag of the United States (1776–1777).svg | flag alias-1777 = Flag of the United States (1777–1795).svg | flag alias-1777-Ross = Betsy Ross flag.svg | flag alias-1795 = Flag of the United States (1795–1818).svg | flag alias-1818 = Flag of the United States (1818-1819).svg | flag alias-1819 = Flag of the United States (1819-1820).svg | flag alias-1820 = Flag of the United States (1820-1822).svg | flag alias-1822 = Flag of the United States (1822-1836).svg | flag alias-1836 = Flag of the United States (1836-1837).svg | flag alias-1837 = Flag of the United States (1837-1845).svg | flag alias-1845 = Flag of the United States (1845-1846).svg | flag alias-1846 = Flag of the United States (1846-1847).svg | flag alias-1847 = Flag of the United States (1847-1848).svg | flag alias-1848 = Flag of the United States (1848-1851).svg | flag alias-1851 = Flag of the United States (1851-1858).svg | flag alias-1858 = Flag of the United States (1858-1859).svg | flag alias-1859 = Flag of the United States (1859-1861).svg | flag alias-1861 = Flag of the United States (1861-1863).svg | flag alias-1863 = Flag of the United States (1863-1865).svg | flag alias-1865 = Flag of the United States (1865-1867).svg | flag alias-1867 = Flag of the United States (1867-1877).svg | flag alias-1877 = Flag of the United States (1877-1890).svg | flag alias-1890 = Flag of the United States (1890-1891).svg | flag alias-1891 = Flag of the United States (1891-1896).svg | flag alias-1896 = Flag of the United States (1896-1908).svg | flag alias-1908 = Flag of the United States (1908-1912).svg | flag alias-1912 = Flag of the United States (1912-1959).svg | flag alias-1959 = Flag of the United States (1959-1960).svg | flag alias-1960 = Flag of the United States (Pantone).svg | flag alias-air force = Flag of the United States Air Force.svg | flag alias-coast guard-1799 = Ensign of the United States Revenue-Marine (1799).png | flag alias-coast guard-1815 = Ensign of the United States Revenue-Marine (1815).png | flag alias-coast guard-1836 = Ensign of the United States Revenue-Marine (1836).png | flag alias-coast guard-1841 = Ensign of the United States Revenue-Marine (1841).png | flag alias-coast guard-1867 = Ensign of the United States Revenue-Marine (1867).png | flag alias-coast guard-1868 = Ensign of the United States Revenue-Marine (1868).png | flag alias-coast guard-1915 = Ensign of the United States Coast Guard (1915-1953).png | flag alias-coast guard = Flag of the United States Coast Guard.svg | link alias-coast guard = {{#switch:{{{variant|}}}|coast guard|coast guard-1915=United States Coast Guard|coast guard-1894=United States Revenue Cutter Service|coast guard-1799|coast guard-1815|coast guard-1836|coast guard-1841|coast guard-1867|coast guard-1868=United States Revenue-Marine|United States Coast Guard}} | flag alias-army = Flag of the United States Army.svg | link alias-naval = {{#switch:{{{variant|}}}|navy|coast guard-1915=United States Coast Guard|United States Coast Guard|United States Navy}} | flag alias-navy-1864 = Flag of the United States Navy (1864-1959).svg | flag alias-navy = Flag of the United States Navy (official).svg | link alias-navy = United States Navy | link alias-marines = {{#switch:{{{variant|}}}|marines|marines-1914=United States Marine Corps|United States Marine Corps}} | flag alias-marines-1914 = Flag of the United States Marine Corps (1914-1939).png | flag alias-marines = Flag of the United States Marine Corps.svg | flag alias-space force = Flag of the United States Space Force.svg | link alias-football = United States {{{mw|men's}}} national {{{age|}}} soccer team | link alias-Australian rules football = United States {{{mw|men's}}} national Australian rules football team | {{#ifeq:{{{altlink}}}|A national rugby union team|link alias-rugby union|empty}} = USA Selects | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | altvar = {{{altvar|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1776 | var2 = 1777 | var3 = 1777-Ross | var4 = 1795 | var5 = 1818 | var6 = 1819 | var7 = 1820 | var8 = 1822 | var9 = 1836 | var10 = 1837 | var11 = 1845 | var12 = 1846 | var13 = 1847 | var14 = 1848 | var15 = 1851 | var16 = 1858 | var17 = 1859 | var18 = 1861 | var19 = 1863 | var20 = 1865 | var21 = 1867 | var22 = 1877 | var23 = 1890 | var24 = 1891 | var25 = 1896 | var26 = 1908 | var27 = 1912 | var28 = 1959 | var29 = 1960 | var30 = coast guard-1915 | var31 = marines-1914 | redir1 = USA | redir2 = US | redir3 = United States of America | redir4 = U.S. </noinclude> }} d023ca4f572e7014db32ac0b6b348871a97d025b Template:Country data Uruguay 10 156 375 374 2022-08-01T11:03:13Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Country_data_Uruguay]] wikitext text/x-wiki {{ {{{1<noinclude>|country showdata</noinclude>}}} | alias = Uruguay | flag alias = Flag of Uruguay.svg | flag alias-1828 = Flag of Uruguay (1828-1830).svg | link alias-naval = National Navy of Uruguay | flag alias-army = Flag of Uruguayan Army.jpg | link alias-army = National Army (Uruguay){{!}}National Army of Uruguay | link alias-air force = Uruguayan Air Force | flag alias-air force = Flag of the Uruguayan Air Force.svg | link alias-navy = National Navy of Uruguay | size = {{{size|}}} | name = {{{name|}}} | altlink = {{{altlink|}}} | variant = {{{variant|}}} <noinclude> | var1 = 1828 | redir1 = URY | redir2 = URU </noinclude> }} cf68443db5f78b4a215460b9f4bd07a4d1e57e99 Template:Flag 10 157 377 376 2022-08-01T11:03:14Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Flag]] wikitext text/x-wiki {{country data {{{1|}}}|flag/core|name={{{name|{{{1|}}}}}}|variant={{{variant|{{{2|}}}}}}|size={{{size|}}}}}<noinclude>{{documentation}}</noinclude> d13aac8e23bee030a6fc9b49a8aa1135104ace22 Template:Flag/core 10 158 379 378 2022-08-01T11:03:15Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Flag/core]] wikitext text/x-wiki <span class="flagicon">[[File:{{{flag alias-{{{variant}}}|{{#if:{{{flag alias|}}}|{{{flag alias}}}|Flag placeholder.svg}}}}}|{{#if:{{{size|}}}|{{{size}}}|{{{size flag alias-{{{variant}}}|{{#if:{{{variant|}}}|23x15px|{{{size flag alias|23x15px}}}}}}}}}}|{{{border-{{{variant}}}|{{{border|border}}}}}} |alt=|link=]]&nbsp;{{#switch:{{{flag alias}}}|Flag of Switzerland.svg|Flag of the Vatican City.svg=&nbsp;}}{{#ifeq:{{{alias}}}|Nepal|&nbsp;&nbsp;}}</span>[[{{{alias}}}|{{{name}}}]]<noinclude>{{documentation}}</noinclude> bbe353c6ea148b8b0752e512df22ad44acee5e29 Template:Infobox UN resolution/doc 10 159 381 380 2022-08-01T11:03:17Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Infobox_UN_resolution/doc]] wikitext text/x-wiki {{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{Lua|Module:Infobox|Module:InfoboxImage|Module:Check for unknown parameters}} {{auto short description}} This template can be used to display a summary of [[United Nations]] [[United Nations Security Council|Security Council]] and [[United Nations General Assembly|General Assembly]] resolutions. == Usage == {{Parameter names example | organ | number | image | image_size | image_alt | caption | date | year | meeting | code | document | subject | votemap | votemap_size | votemap_alt | for | against | abstention | absent | presentnotvoting | result }} <pre style="overflow: auto;"> {{Infobox UN resolution | organ = | number = | image = | image_size = | image_alt = | caption = | date = | year = | meeting = | code = | document = | subject = | votemap = | votemap_size = | votemap_alt = | for = | against = | abstention = | absent = | presentnotvoting = | result = }} </pre> {{clear}} == Parameters == {{TemplateData header}} <templatedata> { "params": { "number": { "required": true, "description": "The number of the resolution" }, "organ": { "required": true, "description": "Use 'SC' for Security Council or 'GA' for General Assembly" }, "image": { "description": "A suitable image" }, "image_size": { "description": "Image size" }, "image_alt": { "description": "Alternative text for image" }, "caption":{ "description": "A caption for the image" }, "date": { "required": true, "description": "The date and month the resolution was voted on" }, "year": { "required": true, "description": "The year the resolution was voted on" }, "meeting": { "description": "The number of the meeting" }, "code": { "description": "The official code given to the resolution" }, "document": { "description": "A link to the resolution text, preferably from the UN website. If document=yes, a link will be generated based on the code" }, "subject": { "description": "The subject of the resolution" }, "votemap":{ "description": "A map of the vote" }, "votemap_size":{ "description": "Image size for map of the vote" }, "votemap_alt":{ "description": "Alternative text for map of the vote" }, "for": { "required": true, "description": "How many member states voted for the resolution" }, "against": { "required": true, "description": "How many member states voted against the resolution" }, "abstention": { "required": true, "description": "How many member states abstained" }, "absent": { "description": "How many member states were absent" }, "presentnotvoting": { "description": "How many member states were present not voting" }, "result": { "required": true, "description": "Use 'Adopted', 'Failed' or 'Vetoed by <country>'" } } } </templatedata> == Examples == {{Infobox UN resolution | number = 2017 | organ = SC | date = 31 October | year = 2011 | meeting = 6,644 | code = S/RES/2017 (2011) | subject = [[Libya]]n situation | for = 15 | abstention = 0 | against = 0 | result = Adopted }} <pre style="overflow:auto;"> {{Infobox UN resolution | number = 2017 | organ = SC | date = 31 October | year = 2011 | meeting = 6,644 | code = S/RES/2017 (2011) | subject = [[Libya]]n situation | for = 15 | abstention = 0 | against = 0 | result = Adopted }} </pre> {{clear}} {{Infobox UN resolution | number = 2337 | organ = SC | image = Gambia (orthographic projection with inset).svg | caption = Map of the Gambia | date = 19 January | year = 2017 | meeting = 7,866 | code = S/RES/2337 (2017) | document = yes | subject = [[2016–2017 Gambian constitutional crisis]] | votemap = S-RES-2337.svg | for = 15 | abstention = 0 | against = 0 | result = Adopted }} <pre style="overflow:auto;"> {{Infobox UN resolution | number = 2337 | organ = SC | image = Gambia (orthographic projection with inset).svg | caption = Map of the Gambia | date = 19 January | year = 2017 | meeting = 7,866 | code = S/RES/2337 (2017) | document = yes | subject = [[2016–2017 Gambian constitutional crisis]] | votemap = S-RES-2337.svg | for = 15 | abstention = 0 | against = 0 | result = Adopted }} </pre> {{clear}} ==Tracking category== * {{clc|Pages using infobox UN resolution with unknown parameters}} <includeonly>{{Sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:United Nations templates]] [[Category:Templates that add a tracking category]] }}</includeonly> 5196c27860ee8709992f64781c6da074461362c6 Template:Nowrap 10 160 383 382 2022-08-01T11:03:20Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Nowrap]] wikitext text/x-wiki <span class="nowrap">{{{1}}}</span><noinclude> {{documentation}} <!-- Categories go on the /doc page; interwikis go to Wikidata. --> </noinclude> 5d0dc6b6d89b37f4356242404f46138a4017f015 Template:Replace 10 161 385 384 2022-08-01T11:03:22Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Replace]] wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:String|replace|source={{{1}}}|{{{2}}}|{{{3}}}|plain={{{plain|true}}}|count={{{count|}}}}}<noinclude> {{documentation}} </noinclude> 4192ba916713e0f44fdfd0f8e0d9d105c0c85472 Template:Subpage other 10 162 387 386 2022-08-01T11:03:25Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Subpage_other]] wikitext text/x-wiki {{#ifeq:{{SUBPAGENAME}}|{{ROOTPAGENAME}}|{{{2|}}}|{{{1|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> ebcb508ec39c25594f4151c4e32c01eeb5732f3d Template:Ubl 10 163 389 388 2022-08-01T11:03:29Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Ubl]] wikitext text/x-wiki #REDIRECT [[Template:Unbulleted list]] {{Rcat shell| {{R from template shortcut}} }} 6b250cba5f224bbaa761c7bdc41463e1cef32a3d Template:Unbulleted list 10 164 391 390 2022-08-01T11:03:30Z 17ademoladav 2 1 revision imported from [[:wikipedia:Template:Unbulleted_list]] wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:list|unbulleted}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 89815a491d3e05b20af446e34cda13f13c25fb4f Template:High-use 10 106 462 271 2022-08-23T22:14:22Z en>GKFX 0 Remove all-pages parameter - no longer used. wikitext text/x-wiki {{#invoke:High-use|main|1={{{1|}}}|2={{{2|}}}|info={{{info|}}}|demo={{{demo|}}}|form={{{form|}}}|expiry={{{expiry|}}}|system={{{system|}}}}}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage; interwiki links go to Wikidata, thank you! --> </noinclude> a3322d1bd47ac03df14fa2090855cff4fede9bc7 Template:Post-nominals 10 193 526 2022-09-04T00:10:43Z en>Pppery 0 Add tracking cat per edit request wikitext text/x-wiki <span class="noexcerpt nowraplinks" style="font-size:{{{size|85%}}}; font-weight:normal;"><!-- -->{{if empty|{{{unlinked|}}}|{{{list|}}}|{{{post-noms|}}}|{{for loop|{{#if:{{{sep|}}}{{{commas|}}}|<span style="font-size:14px;>&#44;</span>}}&#32;|call=post-nominals/{{{country|CAN}}}|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}|{{{10|}}}|{{{11|}}}|{{{12|}}}|{{{13|}}}|{{{14|}}}|{{{15|}}}|{{{16|}}}|{{{17|}}}|{{{18|}}}|{{{19|}}}|{{{20|}}}|skipBlanks=yes}}}}<!-- --></span><!-- -->{{#if:{{{country|{{{unlinked|{{{list|{{{post-noms|<noinclude>1</noinclude>}}}}}}}}}}}}||[[Category:Pages using Template:Post-nominals with missing parameters]]}}<!-- -->{{#if:{{{unlinked|{{{list|{{{post-noms|}}}}}}}}}|[[Category:Pages using Template:Post-nominals with customized linking]] }}<noinclude>{{Documentation}}</noinclude> 2b89288bd9d53136ad548b8a601c1bf4f69e8daf Template:Parameter names example 10 26 554 48 2022-09-15T17:36:18Z en>Aidan9382 0 Hatnote should ideally be moved into documentation as to allow users to edit it regardless of the protection on the main template wikitext text/x-wiki <includeonly>{{#invoke:Parameter names example|main}}</includeonly><noinclude> {{Documentation}} </noinclude> de1e29d6ebc113e9d1649ea6a976625885db8a2f Module:Documentation 828 43 460 178 2022-09-29T01:57:36Z en>Andrybak 0 update code comment according to [[Special:Diff/989669779]] Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return '<span class="' .. message('toolbar-class') .. '">(' .. table.concat(ret, ' &#124; ') .. ')</span>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.fullUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') else pagetype = message('sandbox-notice-pagetype-other') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(message('sandbox-category')) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end local data = {} data.title = title data.docTitle = docTitle -- View, display, edit, and purge links if /doc exists. data.viewLinkDisplay = message('view-link-display') data.editLinkDisplay = message('edit-link-display') data.historyLinkDisplay = message('history-link-display') data.purgeLinkDisplay = message('purge-link-display') -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end data.preload = preload data.createLinkDisplay = message('create-link-display') return data end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local function escapeBrackets(s) -- Escapes square brackets with HTML entities. s = s:gsub('%[', '&#91;') -- Replace square brackets with HTML entities. s = s:gsub('%]', '&#93;') return s end local ret local docTitle = data.docTitle local title = data.title local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay) local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay) ret = '[%s] [%s] [%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink) else local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) ret = '[%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, createLink, purgeLink) end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editUrl = docTitle:fullUrl{action = 'edit'} local editDisplay = message('edit-link-display') local editLink = makeUrlLink(editUrl, editDisplay) local historyUrl = docTitle:fullUrl{action = 'history'} local historyDisplay = message('history-link-display') local historyLink = makeUrlLink(historyUrl, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'} local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p 2fd7faef98df56f55eede30c4ff07b2431823ee1 Home 0 1 392 136 2022-09-29T10:33:26Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers Archivarius Office </b></big></big></center> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' f307fe8fc5d9f918122390fd905f6cc6b7eb3f7a 393 392 2022-09-29T10:43:26Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers Archivarius' Office </b></big></big></center> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' 9ddecf29848015b400dd28ec7cad86b0e4a21fa3 394 393 2022-09-29T10:46:16Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers Archivarius' Office </b></big></big></center> <center> The World Assembly </center> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' 8bac2e9935ea3d111c0ca3790ecd74db46b7b85e 395 394 2022-09-29T10:46:40Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers Archivarius' Office </b></big></big></center> <big> '''The World Assembly''' </big> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' f0ae3bedc11bb5fc287e618cb24db61a3f6915ac 396 395 2022-09-29T10:46:50Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers Archivarius' Office </b></big></big></center> <big> '''The World Assembly''' </big> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' 89ab0f27000a02a7feb8c40eae2bd640f77f58c1 397 396 2022-09-29T10:48:31Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers Archivarius' Office </b></big></big></center> <big> '''The World Assembly''' </big> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' <big> '''The Court of Justice''' </big> '''<big>[[Court Cases]]</big>''' '''<big>[[Court Rulings]]</big?>''' 7d22a1b7477a8e68413777297dc4e6df99fd1dac 398 397 2022-09-29T10:48:44Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers Archivarius' Office </b></big></big></center> <big> '''The World Assembly''' </big> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' <big> '''The Court of Justice''' </big> '''<big>[[Court Cases]]</big>''' '''<big>[[Court Rulings]]</big>''' ef396c35b69587f8b0165017f6ec0b9199da9097 399 398 2022-10-04T20:15:03Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers Archivarius' Office </b></big></big></center> <big> '''The World Assembly''' </big> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' <big> '''The Court of Justice''' </big> '''<big>[[Court Cases]]</big>''' '''<big>[[Court Rulings]]</big>''' **Submit a Resolution** f0e990c16ae2f0c30bcfcf1ba32932a782b371d0 400 399 2022-10-04T20:20:54Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers Archivarius' Office </b></big></big></center> <big> '''The World Assembly''' </big> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' <big> '''The Court of Justice''' </big> '''<big>[[Court Cases]]</big>''' '''<big>[[Court Rulings]]</big>''' === Submit a Resolution === [[Format for Resolutions]] 8ab5f13a7c4f48696763f606f912577095a2770b 402 400 2022-10-04T20:31:00Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers Archivarius' Office </b></big></big></center> <big> '''The World Assembly''' </big> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' <big> '''The Court of Justice''' </big> '''<big>[[Court Cases]]</big>''' '''<big>[[Court Rulings]]</big>''' <big> '''Submit A Resolution''' </big> <inputbox> type=create width=70 placeholder=Ex: ''Rexolution 01234'' preload=Archivarius:Record A Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> 6890e86717b162c9749bbefa048df0528d504583 403 402 2022-10-04T20:31:17Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers Archivarius' Office </b></big></big></center> <big> '''The World Assembly''' </big> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' <big> '''The Court of Justice''' </big> '''<big>[[Court Cases]]</big>''' '''<big>[[Court Rulings]]</big>''' <big> '''Submit A Resolution''' </big> <inputbox> type=create width=70 placeholder=Ex: ''Rexolution 01234'' preload=Archivarius:Record A Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> c2329d442ebe486affcfdf3b13795ddb261cef67 404 403 2022-10-04T20:31:47Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers Archivarius' Office </b></big></big></center> <big> '''The World Assembly''' </big> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' <big> '''The Court of Justice''' </big> '''<big>[[Court Cases]]</big>''' '''<big>[[Court Rulings]]</big>''' <big> '''Submit A Resolution''' </big> <inputbox> type=create width=70 placeholder=Ex: ''Resolution 01234'' preload=Archivarius:Record A Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> 83312642c4b8bdf85ecb0d1c59bc55ed304a8fea 405 404 2022-10-04T20:50:43Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers Archivarius' Office </b></big></big></center> <big> '''The World Assembly''' </big> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' <big> '''The Court of Justice''' </big> '''<big>[[Court Cases]]</big>''' '''<big>[[Court Rulings]]</big>''' <big> '''Submit A Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''Resolution 01234'' preload=Archivarius:Record A Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> dcdbf11e89c9c586e57ef8f9b7481224bf67f0d2 406 405 2022-10-05T12:30:57Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers Archivarius' Office </b></big></big></center> <big> '''The World Assembly''' </big> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' <big> '''The Court of Justice''' </big> '''<big>[[Court Cases]]</big>''' '''<big>[[Court Rulings]]</big>''' <big> '''Submit A Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''Resolution 0000'' preload=Archivarius:Record A Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> cbe5b61271802dec1ccbb3975684d21cf14cf3c1 407 406 2022-10-05T12:33:26Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers Archivarius' Office </b></big></big></center> <big> '''The World Assembly''' </big> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' <big> '''The Security Council''' </big> '''<big>[[Security Council Resolutions]]</big>''' <big> '''The Court of Justice''' </big> '''<big>[[Court Cases]]</big>''' '''<big>[[Court Rulings]]</big>''' <big> '''Submit A Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''Resolution 0000'' preload=Archivarius:Record A Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> 6857da4d73ad96238ea4c5530b5f00c1af0cacbd 410 407 2022-10-05T12:35:33Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers Archivarius' Office </b></big></big></center> <big> '''The World Assembly''' </big> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' <big> '''The Security Council''' </big> '''<big>[[Security Council Resolutions]]</big>''' <big> '''The Court of Justice''' </big> '''<big>[[Court Cases]]</big>''' '''<big>[[Court Rulings]]</big>''' <big> '''Submit A WA Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''Resolution 0000'' preload=Archivarius:Record A Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> <big> '''Submit A SC Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''SC Resolution 0000'' preload=Archivarius:Record A Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> a8d7e20e933810a36196348bbf3e0200e2c1f6b0 412 410 2022-10-05T12:39:46Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers Archivarius' Office </b></big></big></center> <big> '''The World Assembly''' </big> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' <big> '''The Security Council''' </big> '''<big>[[Security Council Resolutions]]</big>''' <big> '''The Court of Justice''' </big> '''<big>[[Court Cases]]</big>''' '''<big>[[Court Rulings]]</big>''' <big> '''Submit A WA Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''Resolution 0000'' preload=Archivarius:Record A Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> <big> '''Submit A SC Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''SC Resolution 0000'' preload=Archivarius:Record A SC Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> 43a7c5f6d4fc40484f7ccd2441ff51e465afb03b Archivarius:Record A Resolution 0 165 401 2022-10-04T20:30:13Z 17ademoladav 2 Created page with "== Resolution Information == Title: Example: The Right to Inspection Citation: Example: LOS/WA/RES/009 Authored by: Example: World Assembly Vice President Colin Anderson Votes For: Example: 25 Votes Against: Example: 10 Votes Abstaining: Example: 3 Status: {{font color|green|In Effect}} == Text == The World Assembly," wikitext text/x-wiki == Resolution Information == Title: Example: The Right to Inspection Citation: Example: LOS/WA/RES/009 Authored by: Example: World Assembly Vice President Colin Anderson Votes For: Example: 25 Votes Against: Example: 10 Votes Abstaining: Example: 3 Status: {{font color|green|In Effect}} == Text == The World Assembly, c24f44d2388e96d2789040e3a26b4913fb90b7c3 Security Council 0 166 408 2022-10-05T12:34:12Z 17ademoladav 2 Created page with "{| class="wikitable" |+ Resolutions of the Security Council as of 2022 |- ! Resolution !! Status |- | [[Resolution 0001]] || In Effect |- | [[Resolution 0002]] || In Effect |- | [[Resolution 0003]] || In Effect |- | [[Resolution 0004]] || Pending |- | [[Resolution 0005]] || Pending |- | [[Resolution 0006]] || Pending |- | [[Resolution 0007]] || Pending |}" wikitext text/x-wiki {| class="wikitable" |+ Resolutions of the Security Council as of 2022 |- ! Resolution !! Status |- | [[Resolution 0001]] || In Effect |- | [[Resolution 0002]] || In Effect |- | [[Resolution 0003]] || In Effect |- | [[Resolution 0004]] || Pending |- | [[Resolution 0005]] || Pending |- | [[Resolution 0006]] || Pending |- | [[Resolution 0007]] || Pending |} 0b1baf8af3703456abeb70b8d08b374bc75ab963 409 408 2022-10-05T12:34:43Z 17ademoladav 2 wikitext text/x-wiki {| class="wikitable" |+ Resolutions of the Security Council as of 2022 |- ! Resolution !! Status |- | [[SC Resolution 0001]] || In Effect |- | [[SC Resolution 0002]] || In Effect |- | [[SC Resolution 0003]] || In Effect |- | [[SC Resolution 0004]] || Pending |- | [[SC Resolution 0005]] || Pending |- | [[SC Resolution 0006]] || Pending |- | [[SC Resolution 0007]] || Pending |} 24ada0b89b7f8f0ef52ca0978945ed1c73c8f159 Archivarius:Record A SC Resolution 0 167 411 2022-10-05T12:39:22Z 17ademoladav 2 Created page with "== Resolution Information == Title: Example: Condemn Greendale Citation: Example: LOS/SC/RES/0001 Votes For: Example: 25 Votes Against: Example: 10 Votes Abstaining: Example: 3 Status: {{font color|green|In Effect}} == Text == The Security Council," wikitext text/x-wiki == Resolution Information == Title: Example: Condemn Greendale Citation: Example: LOS/SC/RES/0001 Votes For: Example: 25 Votes Against: Example: 10 Votes Abstaining: Example: 3 Status: {{font color|green|In Effect}} == Text == The Security Council, 18f29e646598b61fa48ae45921b3f0530f3ac736 SC Resolution 0001 (2021) 0 168 413 2022-10-05T12:43:38Z 17ademoladav 2 Created Resolution via "Record a Resolution" tool wikitext text/x-wiki == Resolution Information == Title: Condemn Flewencedale Citation: LOS/SC/RES/0001 Votes For: 4 Votes Against: 0 Votes Abstaining: 0 Status: {{font color|green|In Effect}} == Text == The Security Council, '''''Horrified''''' by the recent nuclear attack on the Soviet Roman Reich (LOS member), '''''Observing''''' that according to all available evidence, the nation of Flewencedale was responsible for ordering and carrying out the aforementioned attack, '''''Shocked''''' by the fact that despite the nuke, Flewencedale has decided to continue the war and has reaffirmed its hostile status to the Soviet Roman Reich, '''''Noting''''' that a state of war currently exists between the two nations, '''''Maintaining''''' its position that the nation of Flewencedale is the aggressor in this war, '''''Acknowledging''''' the necessity of the LOS Quick Reaction Force’s deployment to assist in the defence and reconstruction of the Soviet Roman Reich, '''''Hopeful''''' for a peaceful resolution to this conflict '''Hereby condemns Flewencedale.''' 57e6e139d021280ef314d239a57c7cd43e75f060 415 413 2022-10-05T12:49:59Z 17ademoladav 2 /* Text */ wikitext text/x-wiki == Resolution Information == Title: Condemn Flewencedale Citation: LOS/SC/RES/0001 Votes For: 4 Votes Against: 0 Votes Abstaining: 0 Status: {{font color|green|In Effect}} == Text == ''The Security Council,'' '''''Horrified''''' by the recent nuclear attack on the Soviet Roman Reich (LOS member), '''''Observing''''' that according to all available evidence, the nation of Flewencedale was responsible for ordering and carrying out the aforementioned attack, '''''Shocked''''' by the fact that despite the nuke, Flewencedale has decided to continue the war and has reaffirmed its hostile status to the Soviet Roman Reich, '''''Noting''''' that a state of war currently exists between the two nations, '''''Maintaining''''' its position that the nation of Flewencedale is the aggressor in this war, '''''Acknowledging''''' the necessity of the LOS Quick Reaction Force’s deployment to assist in the defence and reconstruction of the Soviet Roman Reich, '''''Hopeful''''' for a peaceful resolution to this conflict '''Hereby condemns Flewencedale.''' e921c0bb0cc4ef58d4dab8c13bf40011645b730c Resolution 0003 0 170 416 2022-10-05T15:37:32Z Fantopia6444 5 Created Resolution via "Record a Resolution" tool wikitext text/x-wiki == Resolution Information == Title: "Condemn the 4th Brigade” Citation: LOS/WA/RES/003 Authored by: World Assembly Vice President Colin Anderson Votes For: 37 Votes Against: 8 Votes Abstaining: 2 Status: {{font color|green|In Effect}} == Text == The World Assembly, Recalling the 4th Brigade nuking the Sith Empire, Highlighting the fact that the attack was unprovoked, Horrified that a member of the LoS is not spared from the ever growing ambition of conquering servers of the 4th Brigade, Concerned that the Authority may have been involved, Hopeful that this conflict can reach a peaceful end, Hereby condemns the 4th Brigade. 383128ce16694132f80c31e07613b7a746f6e7d1 418 416 2022-10-05T19:20:23Z 17ademoladav 2 17ademoladav moved page [[Resolution 003]] to [[Resolution 0003]]: Title error wikitext text/x-wiki == Resolution Information == Title: "Condemn the 4th Brigade” Citation: LOS/WA/RES/003 Authored by: World Assembly Vice President Colin Anderson Votes For: 37 Votes Against: 8 Votes Abstaining: 2 Status: {{font color|green|In Effect}} == Text == The World Assembly, Recalling the 4th Brigade nuking the Sith Empire, Highlighting the fact that the attack was unprovoked, Horrified that a member of the LoS is not spared from the ever growing ambition of conquering servers of the 4th Brigade, Concerned that the Authority may have been involved, Hopeful that this conflict can reach a peaceful end, Hereby condemns the 4th Brigade. 383128ce16694132f80c31e07613b7a746f6e7d1 Resolution 0004 0 171 417 2022-10-05T15:39:57Z Fantopia6444 5 Created Resolution via "Record a Resolution" tool wikitext text/x-wiki == Resolution Information == Title: “Establishing International Awards” Citation: LOS/WA/RES/004 Authored by: Example: World Assembly Vice President Colin Anderson Votes For: 20 Votes Against: 5 Votes Abstaining: 7 Status: {{font color|green|In Effect}} == Text == The World Assembly, Realising that some individuals and member nations have made outstanding contributions to the League of Servers throughout its existence, Concerned that there are, as of now, very few ways to reward said nations and individuals, Acknowledging that the League can only exist and prosper as long as there are people willing to commit themselves and put effort into making it a better place, Hereby establishes a system of international awards, consisting of: The Golden Cross of Merit The League’s highest award, given to recognize individuals or nations for outstanding contributions to the security or the interests of the League of Servers, world peace, cultural or other significant public or private endeavours. The Silver Cross of Merit The League’s second-highest award, given to recognize individuals or nations for continuous contributions to the security or the interests of the League of Servers, world peace, cultural or other significant public or private endeavours. The LOS World Peace Award An award to recognize LOS or foreign individuals, groups, or nations, who have put considerable effort into upholding peace and fraternity between nations, for mediating conflicts, or for holding or promoting peace congresses. The LOS Mock-Gov Leadership Award An award to recognize LOS or foreign individuals for significant contributions to the Discord mock-government community, those who worked to grow it and bring it closer together, and who left behind a lasting influence. Growth & Outreach Ribbon Given to members of the League of Servers for substantial contributions to the expansion and development of the League, for outstanding diplomatic service on its behalf or for work to promote fraternity and cooperation between its members. Peace and Protection Ribbon Given to members of the League of Servers for courageous and selfless service to protect the League, its members, and world peace. Cooperation Ribbon Given to members of the League of Servers for considerable work to improve the relations or promote diplomacy between the League’s member-states and for bringing our community closer together. Selfless Service Ribbon Given to members of the League of Servers for enduring personal efforts aimed at helping the League or for exemplary work in one or multiple of its departments. Hereby also establishes the Awards Committee of the World Assembly, consisting of 3 member servers overseen by the League Secretariat, whose job it is to once a month select and award those individuals or nations deemed worthy of receiving one or more of the aforementioned awards. Hereby also petitions the Secretary-General to create the according roles for the awards listed above. 134c59efcede2f64582f9be7ab90b4685382492d 420 417 2022-10-06T10:09:49Z 17ademoladav 2 17ademoladav moved page [[Resolution]] to [[Resolution 0004]]: Title error wikitext text/x-wiki == Resolution Information == Title: “Establishing International Awards” Citation: LOS/WA/RES/004 Authored by: Example: World Assembly Vice President Colin Anderson Votes For: 20 Votes Against: 5 Votes Abstaining: 7 Status: {{font color|green|In Effect}} == Text == The World Assembly, Realising that some individuals and member nations have made outstanding contributions to the League of Servers throughout its existence, Concerned that there are, as of now, very few ways to reward said nations and individuals, Acknowledging that the League can only exist and prosper as long as there are people willing to commit themselves and put effort into making it a better place, Hereby establishes a system of international awards, consisting of: The Golden Cross of Merit The League’s highest award, given to recognize individuals or nations for outstanding contributions to the security or the interests of the League of Servers, world peace, cultural or other significant public or private endeavours. The Silver Cross of Merit The League’s second-highest award, given to recognize individuals or nations for continuous contributions to the security or the interests of the League of Servers, world peace, cultural or other significant public or private endeavours. The LOS World Peace Award An award to recognize LOS or foreign individuals, groups, or nations, who have put considerable effort into upholding peace and fraternity between nations, for mediating conflicts, or for holding or promoting peace congresses. The LOS Mock-Gov Leadership Award An award to recognize LOS or foreign individuals for significant contributions to the Discord mock-government community, those who worked to grow it and bring it closer together, and who left behind a lasting influence. Growth & Outreach Ribbon Given to members of the League of Servers for substantial contributions to the expansion and development of the League, for outstanding diplomatic service on its behalf or for work to promote fraternity and cooperation between its members. Peace and Protection Ribbon Given to members of the League of Servers for courageous and selfless service to protect the League, its members, and world peace. Cooperation Ribbon Given to members of the League of Servers for considerable work to improve the relations or promote diplomacy between the League’s member-states and for bringing our community closer together. Selfless Service Ribbon Given to members of the League of Servers for enduring personal efforts aimed at helping the League or for exemplary work in one or multiple of its departments. Hereby also establishes the Awards Committee of the World Assembly, consisting of 3 member servers overseen by the League Secretariat, whose job it is to once a month select and award those individuals or nations deemed worthy of receiving one or more of the aforementioned awards. Hereby also petitions the Secretary-General to create the according roles for the awards listed above. 134c59efcede2f64582f9be7ab90b4685382492d Resolution 003 0 172 419 2022-10-05T19:20:24Z 17ademoladav 2 17ademoladav moved page [[Resolution 003]] to [[Resolution 0003]]: Title error wikitext text/x-wiki #REDIRECT [[Resolution 0003]] f5baea2abe6f822d659cdfa367e222864b1bd197 Module:Protection banner/config 828 60 458 116 2022-10-06T04:15:13Z en>Paine Ellsworth 0 per edit request at [[Module talk:Protection banner#Tooltip/title does not match the actual protection level]] - fix appearance of protection level Scribunto text/plain -- This module provides configuration data for [[Module:Protection banner]]. return { -------------------------------------------------------------------------------- -- -- BANNER DATA -- -------------------------------------------------------------------------------- --[[ -- Banner data consists of six fields: -- * text - the main protection text that appears at the top of protection -- banners. -- * explanation - the text that appears below the main protection text, used -- to explain the details of the protection. -- * tooltip - the tooltip text you see when you move the mouse over a small -- padlock icon. -- * link - the page that the small padlock icon links to. -- * alt - the alt text for the small padlock icon. This is also used as tooltip -- text for the large protection banners. -- * image - the padlock image used in both protection banners and small padlock -- icons. -- -- The module checks in three separate tables to find a value for each field. -- First it checks the banners table, which has values specific to the reason -- for the page being protected. Then the module checks the defaultBanners -- table, which has values specific to each protection level. Finally, the -- module checks the masterBanner table, which holds data for protection -- templates to use if no data has been found in the previous two tables. -- -- The values in the banner data can take parameters. These are specified -- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name -- enclosed in curly braces). -- -- Available parameters: -- -- ${CURRENTVERSION} - a link to the page history or the move log, with the -- display message "current-version-edit-display" or -- "current-version-move-display". -- -- ${EDITREQUEST} - a link to create an edit request for the current page. -- -- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes -- on the talk page; you may submit a request to ask an administrator to make -- an edit if it is minor or supported by consensus." -- -- ${IMAGELINK} - a link to set the image to, depending on the protection -- action and protection level. -- -- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry -- is set. E.g. "Editing of this page by new or unregistered users is currently -- disabled until dd Month YYYY." -- -- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation -- so that it can be used in run-on sentences. -- -- ${PAGETYPE} - the type of the page, e.g. "article" or "template". -- Defined in the cfg.pagetypes table. -- -- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g. -- "Editing of this page by new or unregistered users is currently disabled" -- -- ${PROTECTIONDATE} - the protection date, if it has been supplied to the -- template. -- -- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or -- "semi-protected". -- -- ${PROTECTIONLOG} - a link to the protection log or the pending changes log, -- depending on the protection action. -- -- ${TALKPAGE} - a link to the talk page. If a section is specified, links -- straight to that talk page section. -- -- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to -- create a blurb like "This template is semi-protected", or "This article is -- move-protected until DD Month YYYY". -- -- ${VANDAL} - links for the specified username (or the root page name) -- using Module:Vandal-m. -- -- Functions -- -- For advanced users, it is possible to use Lua functions instead of strings -- in the banner config tables. Using functions gives flexibility that is not -- possible just by using parameters. Functions take two arguments, the -- protection object and the template arguments, and they must output a string. -- -- For example: -- -- text = function (protectionObj, args) -- if protectionObj.level == 'autoconfirmed' then -- return 'foo' -- else -- return 'bar' -- end -- end -- -- Some protection object properties and methods that may be useful: -- protectionObj.action - the protection action -- protectionObj.level - the protection level -- protectionObj.reason - the protection reason -- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set -- to indefinite, and the protection time in unix time if temporary. -- protectionObj.protectionDate - the protection date in unix time, or nil if -- unspecified. -- protectionObj.bannerConfig - the banner config found by the module. Beware -- of editing the config field used by the function, as it could create an -- infinite loop. -- protectionObj:isProtected - returns a boolean showing whether the page is -- protected. -- protectionObj:isTemporary - returns a boolean showing whether the expiry is -- temporary. -- protectionObj:isIncorrect - returns a boolean showing whether the protection -- template is incorrect. --]] -- The master banner data, used if no values have been found in banners or -- defaultBanners. masterBanner = { text = '${INTROBLURB}', explanation = '${EXPLANATIONBLURB}', tooltip = '${TOOLTIPBLURB}', link = '${IMAGELINK}', alt = 'Page ${PROTECTIONLEVEL}' }, -- The default banner data. This holds banner data for different protection -- levels. -- *required* - this table needs edit, move, autoreview and upload subtables. defaultBanners = { edit = {}, move = {}, autoreview = { default = { alt = 'Page protected with pending changes', tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users', image = 'Pending-protection-shackle.svg' } }, upload = {} }, -- The banner data. This holds banner data for different protection reasons. -- In fact, the reasons specified in this table control which reasons are -- valid inputs to the first positional parameter. -- -- There is also a non-standard "description" field that can be used for items -- in this table. This is a description of the protection reason for use in the -- module documentation. -- -- *required* - this table needs edit, move, autoreview and upload subtables. banners = { edit = { blp = { description = 'For pages protected to promote compliance with the' .. ' [[Wikipedia:Biographies of living persons' .. '|biographies of living persons]] policy', text = '${INTROFRAGMENT} to promote compliance with' .. ' [[Wikipedia:Biographies of living persons' .. "|Wikipedia's&nbsp;policy on&nbsp;the&nbsp;biographies" .. ' of&nbsp;living&nbsp;people]].', tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on' .. ' biographies of living persons', }, dmca = { description = 'For pages protected by the Wikimedia Foundation' .. ' due to [[Digital Millennium Copyright Act]] takedown requests', explanation = function (protectionObj, args) local ret = 'Pursuant to a rights owner notice under the Digital' .. ' Millennium Copyright Act (DMCA) regarding some content' .. ' in this article, the Wikimedia Foundation acted under' .. ' applicable law and took down and restricted the content' .. ' in question.' if args.notice then ret = ret .. ' A copy of the received notice can be found here: ' .. args.notice .. '.' end ret = ret .. ' For more information, including websites discussing' .. ' how to file a counter-notice, please see' .. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}." .. "'''Do not remove this template from the article until the" .. " restrictions are withdrawn'''." return ret end, image = 'Office-protection-shackle.svg', }, dispute = { description = 'For pages protected due to editing disputes', text = function (protectionObj, args) -- Find the value of "disputes". local display = 'disputes' local disputes if args.section then disputes = string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[protectionObj.title.namespace].talk.name, protectionObj.title.text, args.section, display ) else disputes = display end -- Make the blurb, depending on the expiry. local msg if type(protectionObj.expiry) == 'number' then msg = '${INTROFRAGMENT} or until editing %s have been resolved.' else msg = '${INTROFRAGMENT} until editing %s have been resolved.' end return string.format(msg, disputes) end, explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', tooltip = '${TOOLTIPFRAGMENT} due to editing disputes', }, ecp = { description = 'For articles in topic areas authorized by' .. ' [[Wikipedia:Arbitration Committee|ArbCom]] or' .. ' meets the criteria for community use', tooltip = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', alt = 'Extended-protected ${PAGETYPE}', }, mainpage = { description = 'For pages protected for being displayed on the [[Main Page]]', text = 'This file is currently' .. ' [[Wikipedia:This page is protected|protected]] from' .. ' editing because it is currently or will soon be displayed' .. ' on the [[Main Page]].', explanation = 'Images on the Main Page are protected due to their high' .. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.' .. '<br /><span style="font-size:90%;">' .. "'''Administrators:''' Once this image is definitely off the Main Page," .. ' please unprotect this file, or reduce to semi-protection,' .. ' as appropriate.</span>', }, office = { description = 'For pages protected by the Wikimedia Foundation', text = function (protectionObj, args) local ret = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.' if protectionObj.protectionDate then ret = ret .. ' It has been protected since ${PROTECTIONDATE}.' end return ret end, explanation = "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not remove protection from this" .. " page unless you are authorized by the Wikimedia Foundation to do" .. " so.'''", image = 'Office-protection-shackle.svg', }, reset = { description = 'For pages protected by the Wikimedia Foundation and' .. ' "reset" to a bare-bones version', text = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.', explanation = function (protectionObj, args) local ret = '' if protectionObj.protectionDate then ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was' else ret = ret .. 'This ${PAGETYPE} has been' end ret = ret .. ' reduced to a' .. ' simplified, "bare bones" version so that it may be completely' .. ' rewritten to ensure it meets the policies of' .. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].' .. ' Standard Wikipedia policies will apply to its rewriting—which' .. ' will eventually be open to all editors—and will be strictly' .. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while' .. ' it is being rebuilt.\n\n' .. 'Any insertion of material directly from' .. ' pre-protection revisions of the ${PAGETYPE} will be removed, as' .. ' will any material added to the ${PAGETYPE} that is not properly' .. ' sourced. The associated talk page(s) were also cleared on the' .. " same date.\n\n" .. "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not override" .. " this action, and do not remove protection from this page," .. " unless you are authorized by the Wikimedia Foundation" .. " to do so. No editor may remove this notice.'''" return ret end, image = 'Office-protection-shackle.svg', }, sock = { description = 'For pages protected due to' .. ' [[Wikipedia:Sock puppetry|sock puppetry]]', text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of' .. ' [[Wikipedia:Blocking policy|blocked]] or' .. ' [[Wikipedia:Banning policy|banned users]]' .. ' from editing it.', tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from' .. ' editing it', }, template = { description = 'For [[Wikipedia:High-risk templates|high-risk]]' .. ' templates and Lua modules', text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},' .. ' as it is [[Wikipedia:High-risk templates|high-risk]].', explanation = 'Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] or' .. ' [[Wikipedia:Template editor|template editor]] to make an edit if' .. ' it is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by' .. ' [[Wikipedia:Consensus|consensus]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}' .. ' to prevent vandalism', alt = 'Permanently protected ${PAGETYPE}', }, usertalk = { description = 'For pages protected against disruptive edits by a' .. ' particular user', text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,' .. ' such as abusing the' .. ' &#123;&#123;[[Template:unblock|unblock]]&#125;&#125; template.', explanation = 'If you cannot edit this user talk page and you need to' .. ' make a change or leave a message, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for edits to a protected page' .. '|request an edit]],' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]],' .. ' [[Special:Userlogin|log in]],' .. ' or [[Special:UserLogin/signup|create an account]].', }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism|vandalism]]', text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].', explanation = function (protectionObj, args) local ret = '' if protectionObj.level == 'sysop' then ret = ret .. "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ' end return ret .. '${EXPLANATIONBLURB}' end, tooltip = '${TOOLTIPFRAGMENT} due to vandalism', } }, move = { dispute = { description = 'For pages protected against page moves due to' .. ' disputes over the page title', explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', image = 'Move-protection-shackle.svg' }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism#Page-move vandalism' .. ' |page-move vandalism]]' } }, autoreview = {}, upload = {} }, -------------------------------------------------------------------------------- -- -- GENERAL DATA TABLES -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Protection blurbs -------------------------------------------------------------------------------- -- This table produces the protection blurbs available with the -- ${PROTECTIONBLURB} parameter. It is sorted by protection action and -- protection level, and is checked by the module in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionBlurbs = { edit = { default = 'This ${PAGETYPE} is currently [[Help:Protection|' .. 'protected]] from editing', autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access' .. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered' .. ' users|unregistered]] users is currently [[Help:Protection|disabled]]', extendedconfirmed = 'This ${PAGETYPE} is currently under extended confirmed protection', }, move = { default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]' .. ' from [[Help:Moving a page|page moves]]' }, autoreview = { default = 'All edits made to this ${PAGETYPE} by' .. ' [[Wikipedia:User access levels#New users|new]] or' .. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]' .. ' users are currently' .. ' [[Wikipedia:Pending changes|subject to review]]' }, upload = { default = 'Uploading new versions of this ${PAGETYPE} is currently disabled' } }, -------------------------------------------------------------------------------- -- Explanation blurbs -------------------------------------------------------------------------------- -- This table produces the explanation blurbs available with the -- ${EXPLANATIONBLURB} parameter. It is sorted by protection action, -- protection level, and whether the page is a talk page or not. If the page is -- a talk page it will have a talk key of "talk"; otherwise it will have a talk -- key of "subject". The table is checked in the following order: -- 1. page's protection action, page's protection level, page's talk key -- 2. page's protection action, page's protection level, default talk key -- 3. page's protection action, default protection level, page's talk key -- 4. page's protection action, default protection level, default talk key -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. explanationBlurbs = { edit = { autoconfirmed = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', }, extendedconfirmed = { default = 'Extended confirmed protection prevents edits from all unregistered editors' .. ' and registered users with fewer than 30 days tenure and 500 edits.' .. ' The [[Wikipedia:Protection policy#extended|policy on community use]]' .. ' specifies that extended confirmed protection can be applied to combat' .. ' disruption, if semi-protection has proven to be ineffective.' .. ' Extended confirmed protection may also be applied to enforce' .. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].' .. ' Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask for uncontroversial changes supported by' .. ' [[Wikipedia:Consensus|consensus]].' }, default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]]. You may also [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|request]] that this page be unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' You may [[Wikipedia:Requests for page' .. ' protection#Current requests for edits to a protected page|request an' .. ' edit]] to this page, or [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|ask]] for it to be unprotected.' } }, move = { default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves on the' .. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves at' .. ' [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.' } }, autoreview = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Edits to this ${PAGETYPE} by new and unregistered users' .. ' will not be visible to readers until they are accepted by' .. ' a reviewer. To avoid the need for your edits to be' .. ' reviewed, you may' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].' }, }, upload = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but new versions of the file' .. ' cannot be uploaded until it is unprotected. You can' .. ' request that a new version be uploaded by using a' .. ' [[Wikipedia:Edit requests|protected edit request]], or you' .. ' can [[Wikipedia:Requests for page protection|request]]' .. ' that the file be unprotected.' } } }, -------------------------------------------------------------------------------- -- Protection levels -------------------------------------------------------------------------------- -- This table provides the data for the ${PROTECTIONLEVEL} parameter, which -- produces a short label for different protection levels. It is sorted by -- protection action and protection level, and is checked in the following -- order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionLevels = { edit = { default = 'protected', templateeditor = 'template-protected', extendedconfirmed = 'extended-protected', autoconfirmed = 'semi-protected', }, move = { default = 'move-protected' }, autoreview = { }, upload = { default = 'upload-protected' } }, -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- This table lists different padlock images for each protection action and -- protection level. It is used if an image is not specified in any of the -- banner data tables, and if the page does not satisfy the conditions for using -- the ['image-filename-indef'] image. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level images = { edit = { default = 'Full-protection-shackle.svg', templateeditor = 'Template-protection-shackle.svg', extendedconfirmed = 'Extended-protection-shackle.svg', autoconfirmed = 'Semi-protection-shackle.svg' }, move = { default = 'Move-protection-shackle.svg', }, autoreview = { default = 'Pending-protection-shackle.svg' }, upload = { default = 'Upload-protection-shackle.svg' } }, -- Pages with a reason specified in this table will show the special "indef" -- padlock, defined in the 'image-filename-indef' message, if no expiry is set. indefImageReasons = { template = true }, -------------------------------------------------------------------------------- -- Image links -------------------------------------------------------------------------------- -- This table provides the data for the ${IMAGELINK} parameter, which gets -- the image link for small padlock icons based on the page's protection action -- and protection level. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. imageLinks = { edit = { default = 'Wikipedia:Protection policy#full', templateeditor = 'Wikipedia:Protection policy#template', extendedconfirmed = 'Wikipedia:Protection policy#extended', autoconfirmed = 'Wikipedia:Protection policy#semi' }, move = { default = 'Wikipedia:Protection policy#move' }, autoreview = { default = 'Wikipedia:Protection policy#pending' }, upload = { default = 'Wikipedia:Protection policy#upload' } }, -------------------------------------------------------------------------------- -- Padlock indicator names -------------------------------------------------------------------------------- -- This table provides the "name" attribute for the <indicator> extension tag -- with which small padlock icons are generated. All indicator tags on a page -- are displayed in alphabetical order based on this attribute, and with -- indicator tags with duplicate names, the last tag on the page wins. -- The attribute is chosen based on the protection action; table keys must be a -- protection action name or the string "default". padlockIndicatorNames = { autoreview = 'pp-autoreview', default = 'pp-default' }, -------------------------------------------------------------------------------- -- Protection categories -------------------------------------------------------------------------------- --[[ -- The protection categories are stored in the protectionCategories table. -- Keys to this table are made up of the following strings: -- -- 1. the expiry date -- 2. the namespace -- 3. the protection reason (e.g. "dispute" or "vandalism") -- 4. the protection level (e.g. "sysop" or "autoconfirmed") -- 5. the action (e.g. "edit" or "move") -- -- When the module looks up a category in the table, first it will will check to -- see a key exists that corresponds to all five parameters. For example, a -- user page semi-protected from vandalism for two weeks would have the key -- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module -- changes the first part of the key to "all" and checks the table again. It -- keeps checking increasingly generic key combinations until it finds the -- field, or until it reaches the key "all-all-all-all-all". -- -- The module uses a binary matrix to determine the order in which to search. -- This is best demonstrated by a table. In this table, the "0" values -- represent "all", and the "1" values represent the original data (e.g. -- "indef" or "file" or "vandalism"). -- -- expiry namespace reason level action -- order -- 1 1 1 1 1 1 -- 2 0 1 1 1 1 -- 3 1 0 1 1 1 -- 4 0 0 1 1 1 -- 5 1 1 0 1 1 -- 6 0 1 0 1 1 -- 7 1 0 0 1 1 -- 8 0 0 0 1 1 -- 9 1 1 1 0 1 -- 10 0 1 1 0 1 -- 11 1 0 1 0 1 -- 12 0 0 1 0 1 -- 13 1 1 0 0 1 -- 14 0 1 0 0 1 -- 15 1 0 0 0 1 -- 16 0 0 0 0 1 -- 17 1 1 1 1 0 -- 18 0 1 1 1 0 -- 19 1 0 1 1 0 -- 20 0 0 1 1 0 -- 21 1 1 0 1 0 -- 22 0 1 0 1 0 -- 23 1 0 0 1 0 -- 24 0 0 0 1 0 -- 25 1 1 1 0 0 -- 26 0 1 1 0 0 -- 27 1 0 1 0 0 -- 28 0 0 1 0 0 -- 29 1 1 0 0 0 -- 30 0 1 0 0 0 -- 31 1 0 0 0 0 -- 32 0 0 0 0 0 -- -- In this scheme the action has the highest priority, as it is the last -- to change, and the expiry has the least priority, as it changes the most. -- The priorities of the expiry, the protection level and the action are -- fixed, but the priorities of the reason and the namespace can be swapped -- through the use of the cfg.bannerDataNamespaceHasPriority table. --]] -- If the reason specified to the template is listed in this table, -- namespace data will take priority over reason data in the protectionCategories -- table. reasonsWithNamespacePriority = { vandalism = true, }, -- The string to use as a namespace key for the protectionCategories table for each -- namespace number. categoryNamespaceKeys = { [ 2] = 'user', [ 3] = 'user', [ 4] = 'project', [ 6] = 'file', [ 8] = 'mediawiki', [ 10] = 'template', [ 12] = 'project', [ 14] = 'category', [100] = 'portal', [828] = 'module', }, protectionCategories = { ['all|all|all|all|all'] = 'Wikipedia fully protected pages', ['all|all|office|all|all'] = 'Wikipedia Office-protected pages', ['all|all|reset|all|all'] = 'Wikipedia Office-protected pages', ['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages', ['all|all|mainpage|all|all'] = 'Wikipedia fully-protected main page files', ['all|all|all|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|template|all|all|edit'] = 'Wikipedia fully protected templates', ['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages', ['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages', ['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people', ['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people', ['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute', ['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users', ['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism', ['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories', ['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files', ['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals', ['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages', ['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages', ['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates', ['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages', ['all|all|all|templateeditor|edit'] = 'Wikipedia template-protected pages other than templates and modules', ['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates', ['all|template|all|templateeditor|move'] = 'Wikipedia template-protected templates', -- move-protected templates ['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people', ['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people', ['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute', ['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users', ['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism', ['all|category|all|sysop|edit'] = 'Wikipedia fully protected categories', ['all|file|all|sysop|edit'] = 'Wikipedia fully-protected files', ['all|project|all|sysop|edit'] = 'Wikipedia fully-protected project pages', ['all|talk|all|sysop|edit'] = 'Wikipedia fully-protected talk pages', ['all|template|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates', ['all|user|all|sysop|edit'] = 'Wikipedia fully protected user and user talk pages', ['all|module|all|all|edit'] = 'Wikipedia fully-protected modules', ['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules', ['all|module|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected modules', ['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules', ['all|all|all|sysop|move'] = 'Wikipedia move-protected pages', ['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages', ['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute', ['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism', ['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals', ['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages', ['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages', ['all|template|all|sysop|move'] = 'Wikipedia move-protected templates', ['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages', ['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages', ['all|file|all|all|upload'] = 'Wikipedia upload-protected files', }, -------------------------------------------------------------------------------- -- Expiry category config -------------------------------------------------------------------------------- -- This table configures the expiry category behaviour for each protection -- action. -- * If set to true, setting that action will always categorise the page if -- an expiry parameter is not set. -- * If set to false, setting that action will never categorise the page. -- * If set to nil, the module will categorise the page if: -- 1) an expiry parameter is not set, and -- 2) a reason is provided, and -- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck -- table. expiryCheckActions = { edit = nil, move = false, autoreview = true, upload = false }, reasonsWithoutExpiryCheck = { blp = true, template = true, }, -------------------------------------------------------------------------------- -- Pagetypes -------------------------------------------------------------------------------- -- This table produces the page types available with the ${PAGETYPE} parameter. -- Keys are namespace numbers, or the string "default" for the default value. pagetypes = { [0] = 'article', [6] = 'file', [10] = 'template', [14] = 'category', [828] = 'module', default = 'page' }, -------------------------------------------------------------------------------- -- Strings marking indefinite protection -------------------------------------------------------------------------------- -- This table contains values passed to the expiry parameter that mean the page -- is protected indefinitely. indefStrings = { ['indef'] = true, ['indefinite'] = true, ['indefinitely'] = true, ['infinite'] = true, }, -------------------------------------------------------------------------------- -- Group hierarchy -------------------------------------------------------------------------------- -- This table maps each group to all groups that have a superset of the original -- group's page editing permissions. hierarchy = { sysop = {}, reviewer = {'sysop'}, filemover = {'sysop'}, templateeditor = {'sysop'}, extendedconfirmed = {'sysop'}, autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'}, user = {'autoconfirmed'}, ['*'] = {'user'} }, -------------------------------------------------------------------------------- -- Wrapper templates and their default arguments -------------------------------------------------------------------------------- -- This table contains wrapper templates used with the module, and their -- default arguments. Templates specified in this table should contain the -- following invocation, and no other template content: -- -- {{#invoke:Protection banner|main}} -- -- If other content is desired, it can be added between -- <noinclude>...</noinclude> tags. -- -- When a user calls one of these wrapper templates, they will use the -- default arguments automatically. However, users can override any of the -- arguments. wrappers = { ['Template:Pp'] = {}, ['Template:Pp-extended'] = {'ecp'}, ['Template:Pp-blp'] = {'blp'}, -- we don't need Template:Pp-create ['Template:Pp-dispute'] = {'dispute'}, ['Template:Pp-main-page'] = {'mainpage'}, ['Template:Pp-move'] = {action = 'move', catonly = 'yes'}, ['Template:Pp-move-dispute'] = {'dispute', action = 'move', catonly = 'yes'}, -- we don't need Template:Pp-move-indef ['Template:Pp-move-vandalism'] = {'vandalism', action = 'move', catonly = 'yes'}, ['Template:Pp-office'] = {'office'}, ['Template:Pp-office-dmca'] = {'dmca'}, ['Template:Pp-pc'] = {action = 'autoreview', small = true}, ['Template:Pp-pc1'] = {action = 'autoreview', small = true}, ['Template:Pp-reset'] = {'reset'}, ['Template:Pp-semi-indef'] = {small = true}, ['Template:Pp-sock'] = {'sock'}, ['Template:Pp-template'] = {'template', small = true}, ['Template:Pp-upload'] = {action = 'upload'}, ['Template:Pp-usertalk'] = {'usertalk'}, ['Template:Pp-vandalism'] = {'vandalism'}, }, -------------------------------------------------------------------------------- -- -- MESSAGES -- -------------------------------------------------------------------------------- msg = { -------------------------------------------------------------------------------- -- Intro blurb and intro fragment -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${INTROBLURB} and -- ${INTROFRAGMENT} parameters. If the protection is temporary they use the -- intro-blurb-expiry or intro-fragment-expiry, and if not they use -- intro-blurb-noexpiry or intro-fragment-noexpiry. -- It is possible to use banner parameters in these messages. ['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.', ['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.', ['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},', ['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}', -------------------------------------------------------------------------------- -- Tooltip blurb -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${TOOLTIPBLURB} parameter. -- If the protection is temporary the tooltip-blurb-expiry message is used, and -- if not the tooltip-blurb-noexpiry message is used. -- It is possible to use banner parameters in these messages. ['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.', ['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.', ['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},', ['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', -------------------------------------------------------------------------------- -- Special explanation blurb -------------------------------------------------------------------------------- -- An explanation blurb for pages that cannot be unprotected, e.g. for pages -- in the MediaWiki namespace. -- It is possible to use banner parameters in this message. ['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]].', -------------------------------------------------------------------------------- -- Protection log display values -------------------------------------------------------------------------------- -- These messages determine the display values for the protection log link -- or the pending changes log link produced by the ${PROTECTIONLOG} parameter. -- It is possible to use banner parameters in these messages. ['protection-log-display'] = 'protection log', ['pc-log-display'] = 'pending changes log', -------------------------------------------------------------------------------- -- Current version display values -------------------------------------------------------------------------------- -- These messages determine the display values for the page history link -- or the move log link produced by the ${CURRENTVERSION} parameter. -- It is possible to use banner parameters in these messages. ['current-version-move-display'] = 'current title', ['current-version-edit-display'] = 'current version', -------------------------------------------------------------------------------- -- Talk page -------------------------------------------------------------------------------- -- This message determines the display value of the talk page link produced -- with the ${TALKPAGE} parameter. -- It is possible to use banner parameters in this message. ['talk-page-link-display'] = 'talk page', -------------------------------------------------------------------------------- -- Edit requests -------------------------------------------------------------------------------- -- This message determines the display value of the edit request link produced -- with the ${EDITREQUEST} parameter. -- It is possible to use banner parameters in this message. ['edit-request-display'] = 'submit an edit request', -------------------------------------------------------------------------------- -- Expiry date format -------------------------------------------------------------------------------- -- This is the format for the blurb expiry date. It should be valid input for -- the first parameter of the #time parser function. ['expiry-date-format'] = 'F j, Y "at" H:i e', -------------------------------------------------------------------------------- -- Tracking categories -------------------------------------------------------------------------------- -- These messages determine which tracking categories the module outputs. ['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates', ['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules', -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- These are images that are not defined by their protection action and protection level. ['image-filename-indef'] = 'Full-protection-shackle.svg', ['image-filename-default'] = 'Transparent.gif', -------------------------------------------------------------------------------- -- End messages -------------------------------------------------------------------------------- } -------------------------------------------------------------------------------- -- End configuration -------------------------------------------------------------------------------- } 59c408f72ce81e080cce79518231e85981ebcf3b Resolution 0 173 421 2022-10-06T10:09:49Z 17ademoladav 2 17ademoladav moved page [[Resolution]] to [[Resolution 0004]]: Title error wikitext text/x-wiki #REDIRECT [[Resolution 0004]] f7ecb9658f33ca53c034b80dfde0929d37365070 World Assembly 0 64 422 165 2022-10-06T10:10:19Z 17ademoladav 2 wikitext text/x-wiki {| class="wikitable" |+ Resolutions of the World Assembly as of 2022 |- ! Resolution !! Status |- | [[Resolution 0001]] || In Effect |- | [[Resolution 0002]] || In Effect |- | [[Resolution 0003]] || In Effect |- | [[Resolution 0004]] || In Effect |- | [[Resolution 0005]] || Pending |- | [[Resolution 0006]] || Pending |- | [[Resolution 0007]] || Pending |} 6ad635588b38be2246c7989725d5a4f339c8ac62 Template:Infobox court 10 191 520 2022-10-10T19:58:28Z en>Ergo Sum 0 add parameter for image scaling factor. Preferable to static pixel definition parameter wikitext text/x-wiki {{Infobox | above = {{if empty|{{{court_name|}}}|<includeonly>{{PAGENAME}}</includeonly>}} | subheader = {{{native_name|}}} | imagestyle = padding-bottom:0.4em; border-bottom:solid 1px #aaa; | image = {{#invoke:InfoboxImage|InfoboxImage |image={{if empty|{{{image|}}} }}|size={{{imagesize|}}} |upright={{if empty|{{{image_upright|}}}|1}} |alt={{{alt|}}}}} | caption = {{{caption|}}} | image2 = {{#invoke:InfoboxImage|InfoboxImage |image={{if empty|{{{image2|}}}}}|size={{{imagesize2|}}} |upright={{if empty|{{{image_upright2|}}}|1}} |alt={{{alt2|}}}}} | caption2 = {{{caption2|}}} | headerstyle = background-color: #E7E7FF; border-top:solid 1px #aaa; | label1 = Established | data1 = {{{established|}}} | label2 = Dissolved | data2 = {{{dissolved|}}} | label3 = Jurisdiction | data3 = {{{jurisdiction|}}} | label4 = Location | data4 = {{{location|}}} | label5 = [[Geographic coordinate system|Coordinates]] | data5 = {{{coordinates|}}} | label6 = Motto | data6 = {{{motto|}}} | label7 = Composition method | data7 = {{{type|}}} | label8 = {{{at|Authorized}}} by | data8 = {{{authority|}}} | label9 = [[Appellate court|Appeals to]] | data9 = {{{appealsto|{{{appeals|}}}}}} | label10 = {{nowrap|[[Appeal|Appeals from]]}} | data10 = {{{appealsfrom|}}} | label11 = Judge term length | data11 = {{{terms|}}} | label12 = Number of positions | data12 = {{{positions|}}} | label13 = Annual budget | data13 = {{{budget|}}} | label14 = Language | data14 = {{{language|}}} | label15 = Type of tribunal | data15 = {{{tribunal-type|}}} | label16 = Website | data16 = {{{website|}}} | header17 = {{{chiefjudgetitle|}}} | label18 = Currently | data18 = {{{chiefjudgename|}}} | label19 = Since | data19 = {{{termstart|}}} | label20 = Lead position ends | data20 = {{{termend|}}} | label21 = Jurist term ends | data21 = {{{termend2|}}} | header22 = {{{chiefjudgetitle2|}}} | label23 = Currently | data23 = {{{chiefjudgename2|}}} | label24 = Since | data24 = {{{termstart2|}}} | label25 = Lead position ends | data25 = {{{termend3|}}} | label26 = Jurist term ends | data26 = {{{termend4|}}} | header27 = {{{chiefjudgetitle3|}}} | label28 = Currently | data28 = {{{chiefjudgename3|}}} | label29 = Since | data29 = {{{termstart3|}}} | label30 = Lead position ends | data30 = {{{termend5|}}} | label31 = Jurist term ends | data31 = {{{termend6|}}} | header32 = {{#if:{{{division_map|}}}|Division map}} | data33 = {{#invoke:InfoboxImage|InfoboxImage|image={{{division_map|}}}|size={{{division_map_size|}}}|alt={{{division_map_alt|}}}}} | data34 = {{#if:{{{division_map|}}}|{{{division_caption|}}}}} }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox court with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox court]] with unknown parameter "_VALUE_"|ignoreblank=y| court_name | native_name | image | imagesize | alt | caption | image2 | imagesize2 | image_upright | image_upright2 | alt2 | caption2 | established | dissolved | jurisdiction | location | coordinates | motto | type | authority | appealsto | appealsfrom | terms | positions | budget | language | tribunal-type | website | chiefjudgetitle | chiefjudgename | termstart | termend | termend2 | chiefjudgetitle2 | chiefjudgename2 | termstart2 | termend3 | termend4 | chiefjudgetitle3 | chiefjudgename3 | termstart3 | termend5 | termend6 | division_map | division_map_size | division_map_alt | division_caption }}<noinclude> {{Documentation}}<!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 21fd8dbea1629407e2387cd8e8be23bae8a66b32 Module:Protection banner 828 59 456 114 2022-10-21T08:07:11Z en>WOSlinker 0 use require('strict') instead of require('Module:No globals') Scribunto text/plain -- This module implements {{pp-meta}} and its daughter templates such as -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. -- Initialise necessary modules. require('strict') local makeFileLink = require('Module:File link')._main local effectiveProtectionLevel = require('Module:Effective protection level')._main local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main local yesno = require('Module:Yesno') -- Lazily initialise modules and objects we don't always need. local getArgs, makeMessageBox, lang -- Set constants. local CONFIG_MODULE = 'Module:Protection banner/config' -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function makeCategoryLink(cat, sort) if cat then return string.format( '[[%s:%s|%s]]', mw.site.namespaces[14].name, cat, sort ) end end -- Validation function for the expiry and the protection date local function validateDate(dateString, dateType) if not lang then lang = mw.language.getContentLanguage() end local success, result = pcall(lang.formatDate, lang, 'U', dateString) if success then result = tonumber(result) if result then return result end end error(string.format( 'invalid %s: %s', dateType, tostring(dateString) ), 4) end local function makeFullUrl(page, query, display) return string.format( '[%s %s]', tostring(mw.uri.fullUrl(page, query)), display ) end -- Given a directed graph formatted as node -> table of direct successors, -- get a table of all nodes reachable from a given node (though always -- including the given node). local function getReachableNodes(graph, start) local toWalk, retval = {[start] = true}, {} while true do -- Can't use pairs() since we're adding and removing things as we're iterating local k = next(toWalk) -- This always gets the "first" key if k == nil then return retval end toWalk[k] = nil retval[k] = true for _,v in ipairs(graph[k]) do if not retval[v] then toWalk[v] = true end end end end -------------------------------------------------------------------------------- -- Protection class -------------------------------------------------------------------------------- local Protection = {} Protection.__index = Protection Protection.supportedActions = { edit = true, move = true, autoreview = true, upload = true } Protection.bannerConfigFields = { 'text', 'explanation', 'tooltip', 'alt', 'link', 'image' } function Protection.new(args, cfg, title) local obj = {} obj._cfg = cfg obj.title = title or mw.title.getCurrentTitle() -- Set action if not args.action then obj.action = 'edit' elseif Protection.supportedActions[args.action] then obj.action = args.action else error(string.format( 'invalid action: %s', tostring(args.action) ), 3) end -- Set level obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title) if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then -- Users need to be autoconfirmed to move pages anyway, so treat -- semi-move-protected pages as unprotected. obj.level = '*' end -- Set expiry local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title) if effectiveExpiry == 'infinity' then obj.expiry = 'indef' elseif effectiveExpiry ~= 'unknown' then obj.expiry = validateDate(effectiveExpiry, 'expiry date') end -- Set reason if args[1] then obj.reason = mw.ustring.lower(args[1]) if obj.reason:find('|') then error('reasons cannot contain the pipe character ("|")', 3) end end -- Set protection date if args.date then obj.protectionDate = validateDate(args.date, 'protection date') end -- Set banner config do obj.bannerConfig = {} local configTables = {} if cfg.banners[obj.action] then configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason] end if cfg.defaultBanners[obj.action] then configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level] configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default end configTables[#configTables + 1] = cfg.masterBanner for i, field in ipairs(Protection.bannerConfigFields) do for j, t in ipairs(configTables) do if t[field] then obj.bannerConfig[field] = t[field] break end end end end return setmetatable(obj, Protection) end function Protection:isUserScript() -- Whether the page is a user JavaScript or CSS page. local title = self.title return title.namespace == 2 and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) end function Protection:isProtected() return self.level ~= '*' end function Protection:shouldShowLock() -- Whether we should output a banner/padlock return self:isProtected() and not self:isUserScript() end -- Whether this page needs a protection category. Protection.shouldHaveProtectionCategory = Protection.shouldShowLock function Protection:isTemporary() return type(self.expiry) == 'number' end function Protection:makeProtectionCategory() if not self:shouldHaveProtectionCategory() then return '' end local cfg = self._cfg local title = self.title -- Get the expiry key fragment. local expiryFragment if self.expiry == 'indef' then expiryFragment = self.expiry elseif type(self.expiry) == 'number' then expiryFragment = 'temp' end -- Get the namespace key fragment. local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace] if not namespaceFragment and title.namespace % 2 == 1 then namespaceFragment = 'talk' end -- Define the order that key fragments are tested in. This is done with an -- array of tables containing the value to be tested, along with its -- position in the cfg.protectionCategories table. local order = { {val = expiryFragment, keypos = 1}, {val = namespaceFragment, keypos = 2}, {val = self.reason, keypos = 3}, {val = self.level, keypos = 4}, {val = self.action, keypos = 5} } --[[ -- The old protection templates used an ad-hoc protection category system, -- with some templates prioritising namespaces in their categories, and -- others prioritising the protection reason. To emulate this in this module -- we use the config table cfg.reasonsWithNamespacePriority to set the -- reasons for which namespaces have priority over protection reason. -- If we are dealing with one of those reasons, move the namespace table to -- the end of the order table, i.e. give it highest priority. If not, the -- reason should have highest priority, so move that to the end of the table -- instead. --]] table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3)) --[[ -- Define the attempt order. Inactive subtables (subtables with nil "value" -- fields) are moved to the end, where they will later be given the key -- "all". This is to cut down on the number of table lookups in -- cfg.protectionCategories, which grows exponentially with the number of -- non-nil keys. We keep track of the number of active subtables with the -- noActive parameter. --]] local noActive, attemptOrder do local active, inactive = {}, {} for i, t in ipairs(order) do if t.val then active[#active + 1] = t else inactive[#inactive + 1] = t end end noActive = #active attemptOrder = active for i, t in ipairs(inactive) do attemptOrder[#attemptOrder + 1] = t end end --[[ -- Check increasingly generic key combinations until we find a match. If a -- specific category exists for the combination of key fragments we are -- given, that match will be found first. If not, we keep trying different -- key fragment combinations until we match using the key -- "all-all-all-all-all". -- -- To generate the keys, we index the key subtables using a binary matrix -- with indexes i and j. j is only calculated up to the number of active -- subtables. For example, if there were three active subtables, the matrix -- would look like this, with 0 corresponding to the key fragment "all", and -- 1 corresponding to other key fragments. -- -- j 1 2 3 -- i -- 1 1 1 1 -- 2 0 1 1 -- 3 1 0 1 -- 4 0 0 1 -- 5 1 1 0 -- 6 0 1 0 -- 7 1 0 0 -- 8 0 0 0 -- -- Values of j higher than the number of active subtables are set -- to the string "all". -- -- A key for cfg.protectionCategories is constructed for each value of i. -- The position of the value in the key is determined by the keypos field in -- each subtable. --]] local cats = cfg.protectionCategories for i = 1, 2^noActive do local key = {} for j, t in ipairs(attemptOrder) do if j > noActive then key[t.keypos] = 'all' else local quotient = i / 2 ^ (j - 1) quotient = math.ceil(quotient) if quotient % 2 == 1 then key[t.keypos] = t.val else key[t.keypos] = 'all' end end end key = table.concat(key, '|') local attempt = cats[key] if attempt then return makeCategoryLink(attempt, title.text) end end return '' end function Protection:isIncorrect() local expiry = self.expiry return not self:shouldHaveProtectionCategory() or type(expiry) == 'number' and expiry < os.time() end function Protection:isTemplateProtectedNonTemplate() local action, namespace = self.action, self.title.namespace return self.level == 'templateeditor' and ( (action ~= 'edit' and action ~= 'move') or (namespace ~= 10 and namespace ~= 828) ) end function Protection:makeCategoryLinks() local msg = self._cfg.msg local ret = {self:makeProtectionCategory()} if self:isIncorrect() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-incorrect'], self.title.text ) end if self:isTemplateProtectedNonTemplate() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-template'], self.title.text ) end return table.concat(ret) end -------------------------------------------------------------------------------- -- Blurb class -------------------------------------------------------------------------------- local Blurb = {} Blurb.__index = Blurb Blurb.bannerTextFields = { text = true, explanation = true, tooltip = true, alt = true, link = true } function Blurb.new(protectionObj, args, cfg) return setmetatable({ _cfg = cfg, _protectionObj = protectionObj, _args = args }, Blurb) end -- Private methods -- function Blurb:_formatDate(num) -- Formats a Unix timestamp into dd Month, YYYY format. lang = lang or mw.language.getContentLanguage() local success, date = pcall( lang.formatDate, lang, self._cfg.msg['expiry-date-format'] or 'j F Y', '@' .. tostring(num) ) if success then return date end end function Blurb:_getExpandedMessage(msgKey) return self:_substituteParameters(self._cfg.msg[msgKey]) end function Blurb:_substituteParameters(msg) if not self._params then local parameterFuncs = {} parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter parameterFuncs.EDITREQUEST = self._makeEditRequestParameter parameterFuncs.EXPIRY = self._makeExpiryParameter parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter parameterFuncs.IMAGELINK = self._makeImageLinkParameter parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter parameterFuncs.PAGETYPE = self._makePagetypeParameter parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter parameterFuncs.TALKPAGE = self._makeTalkPageParameter parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter parameterFuncs.VANDAL = self._makeVandalTemplateParameter self._params = setmetatable({}, { __index = function (t, k) local param if parameterFuncs[k] then param = parameterFuncs[k](self) end param = param or '' t[k] = param return param end }) end msg = msg:gsub('${(%u+)}', self._params) return msg end function Blurb:_makeCurrentVersionParameter() -- A link to the page history or the move log, depending on the kind of -- protection. local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'move' then -- We need the move log link. return makeFullUrl( 'Special:Log', {type = 'move', page = pagename}, self:_getExpandedMessage('current-version-move-display') ) else -- We need the history link. return makeFullUrl( pagename, {action = 'history'}, self:_getExpandedMessage('current-version-edit-display') ) end end function Blurb:_makeEditRequestParameter() local mEditRequest = require('Module:Submit an edit request') local action = self._protectionObj.action local level = self._protectionObj.level -- Get the edit request type. local requestType if action == 'edit' then if level == 'autoconfirmed' then requestType = 'semi' elseif level == 'extendedconfirmed' then requestType = 'extended' elseif level == 'templateeditor' then requestType = 'template' end end requestType = requestType or 'full' -- Get the display value. local display = self:_getExpandedMessage('edit-request-display') return mEditRequest._link{type = requestType, display = display} end function Blurb:_makeExpiryParameter() local expiry = self._protectionObj.expiry if type(expiry) == 'number' then return self:_formatDate(expiry) else return expiry end end function Blurb:_makeExplanationBlurbParameter() -- Cover special cases first. if self._protectionObj.title.namespace == 8 then -- MediaWiki namespace return self:_getExpandedMessage('explanation-blurb-nounprotect') end -- Get explanation blurb table keys local action = self._protectionObj.action local level = self._protectionObj.level local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject' -- Find the message in the explanation blurb table and substitute any -- parameters. local explanations = self._cfg.explanationBlurbs local msg if explanations[action][level] and explanations[action][level][talkKey] then msg = explanations[action][level][talkKey] elseif explanations[action][level] and explanations[action][level].default then msg = explanations[action][level].default elseif explanations[action].default and explanations[action].default[talkKey] then msg = explanations[action].default[talkKey] elseif explanations[action].default and explanations[action].default.default then msg = explanations[action].default.default else error(string.format( 'could not find explanation blurb for action "%s", level "%s" and talk key "%s"', action, level, talkKey ), 8) end return self:_substituteParameters(msg) end function Blurb:_makeImageLinkParameter() local imageLinks = self._cfg.imageLinks local action = self._protectionObj.action local level = self._protectionObj.level local msg if imageLinks[action][level] then msg = imageLinks[action][level] elseif imageLinks[action].default then msg = imageLinks[action].default else msg = imageLinks.edit.default end return self:_substituteParameters(msg) end function Blurb:_makeIntroBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-blurb-expiry') else return self:_getExpandedMessage('intro-blurb-noexpiry') end end function Blurb:_makeIntroFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-fragment-expiry') else return self:_getExpandedMessage('intro-fragment-noexpiry') end end function Blurb:_makePagetypeParameter() local pagetypes = self._cfg.pagetypes return pagetypes[self._protectionObj.title.namespace] or pagetypes.default or error('no default pagetype defined', 8) end function Blurb:_makeProtectionBlurbParameter() local protectionBlurbs = self._cfg.protectionBlurbs local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionBlurbs[action][level] then msg = protectionBlurbs[action][level] elseif protectionBlurbs[action].default then msg = protectionBlurbs[action].default elseif protectionBlurbs.edit.default then msg = protectionBlurbs.edit.default else error('no protection blurb defined for protectionBlurbs.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionDateParameter() local protectionDate = self._protectionObj.protectionDate if type(protectionDate) == 'number' then return self:_formatDate(protectionDate) else return protectionDate end end function Blurb:_makeProtectionLevelParameter() local protectionLevels = self._cfg.protectionLevels local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionLevels[action][level] then msg = protectionLevels[action][level] elseif protectionLevels[action].default then msg = protectionLevels[action].default elseif protectionLevels.edit.default then msg = protectionLevels.edit.default else error('no protection level defined for protectionLevels.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionLogParameter() local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'autoreview' then -- We need the pending changes log. return makeFullUrl( 'Special:Log', {type = 'stable', page = pagename}, self:_getExpandedMessage('pc-log-display') ) else -- We need the protection log. return makeFullUrl( 'Special:Log', {type = 'protect', page = pagename}, self:_getExpandedMessage('protection-log-display') ) end end function Blurb:_makeTalkPageParameter() return string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[self._protectionObj.title.namespace].talk.name, self._protectionObj.title.text, self._args.section or 'top', self:_getExpandedMessage('talk-page-link-display') ) end function Blurb:_makeTooltipBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-blurb-expiry') else return self:_getExpandedMessage('tooltip-blurb-noexpiry') end end function Blurb:_makeTooltipFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-fragment-expiry') else return self:_getExpandedMessage('tooltip-fragment-noexpiry') end end function Blurb:_makeVandalTemplateParameter() return mw.getCurrentFrame():expandTemplate{ title="vandal-m", args={self._args.user or self._protectionObj.title.baseText} } end -- Public methods -- function Blurb:makeBannerText(key) -- Validate input. if not key or not Blurb.bannerTextFields[key] then error(string.format( '"%s" is not a valid banner config field', tostring(key) ), 2) end -- Generate the text. local msg = self._protectionObj.bannerConfig[key] if type(msg) == 'string' then return self:_substituteParameters(msg) elseif type(msg) == 'function' then msg = msg(self._protectionObj, self._args) if type(msg) ~= 'string' then error(string.format( 'bad output from banner config function with key "%s"' .. ' (expected string, got %s)', tostring(key), type(msg) ), 4) end return self:_substituteParameters(msg) end end -------------------------------------------------------------------------------- -- BannerTemplate class -------------------------------------------------------------------------------- local BannerTemplate = {} BannerTemplate.__index = BannerTemplate function BannerTemplate.new(protectionObj, cfg) local obj = {} obj._cfg = cfg -- Set the image filename. local imageFilename = protectionObj.bannerConfig.image if imageFilename then obj._imageFilename = imageFilename else -- If an image filename isn't specified explicitly in the banner config, -- generate it from the protection status and the namespace. local action = protectionObj.action local level = protectionObj.level local namespace = protectionObj.title.namespace local reason = protectionObj.reason -- Deal with special cases first. if ( namespace == 10 or namespace == 828 or reason and obj._cfg.indefImageReasons[reason] ) and action == 'edit' and level == 'sysop' and not protectionObj:isTemporary() then -- Fully protected modules and templates get the special red "indef" -- padlock. obj._imageFilename = obj._cfg.msg['image-filename-indef'] else -- Deal with regular protection types. local images = obj._cfg.images if images[action] then if images[action][level] then obj._imageFilename = images[action][level] elseif images[action].default then obj._imageFilename = images[action].default end end end end return setmetatable(obj, BannerTemplate) end function BannerTemplate:renderImage() local filename = self._imageFilename or self._cfg.msg['image-filename-default'] or 'Transparent.gif' return makeFileLink{ file = filename, size = (self.imageWidth or 20) .. 'px', alt = self._imageAlt, link = self._imageLink, caption = self.imageCaption } end -------------------------------------------------------------------------------- -- Banner class -------------------------------------------------------------------------------- local Banner = setmetatable({}, BannerTemplate) Banner.__index = Banner function Banner.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 40 obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip. obj._reasonText = blurbObj:makeBannerText('text') obj._explanationText = blurbObj:makeBannerText('explanation') obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing. return setmetatable(obj, Banner) end function Banner:__tostring() -- Renders the banner. makeMessageBox = makeMessageBox or require('Module:Message box').main local reasonText = self._reasonText or error('no reason text set', 2) local explanationText = self._explanationText local mbargs = { page = self._page, type = 'protection', image = self:renderImage(), text = string.format( "'''%s'''%s", reasonText, explanationText and '<br />' .. explanationText or '' ) } return makeMessageBox('mbox', mbargs) end -------------------------------------------------------------------------------- -- Padlock class -------------------------------------------------------------------------------- local Padlock = setmetatable({}, BannerTemplate) Padlock.__index = Padlock function Padlock.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 20 obj.imageCaption = blurbObj:makeBannerText('tooltip') obj._imageAlt = blurbObj:makeBannerText('alt') obj._imageLink = blurbObj:makeBannerText('link') obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action] or cfg.padlockIndicatorNames.default or 'pp-default' return setmetatable(obj, Padlock) end function Padlock:__tostring() local frame = mw.getCurrentFrame() -- The nowiki tag helps prevent whitespace at the top of articles. return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{ name = 'indicator', args = {name = self._indicatorName}, content = self:renderImage() } end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- This is used for testing purposes. return { Protection = Protection, Blurb = Blurb, BannerTemplate = BannerTemplate, Banner = Banner, Padlock = Padlock, } end function p._main(args, cfg, title) args = args or {} cfg = cfg or require(CONFIG_MODULE) local protectionObj = Protection.new(args, cfg, title) local ret = {} -- If a page's edit protection is equally or more restrictive than its -- protection from some other action, then don't bother displaying anything -- for the other action (except categories). if not yesno(args.catonly) and (protectionObj.action == 'edit' or args.demolevel or not getReachableNodes( cfg.hierarchy, protectionObj.level )[effectiveProtectionLevel('edit', protectionObj.title)]) then -- Initialise the blurb object local blurbObj = Blurb.new(protectionObj, args, cfg) -- Render the banner if protectionObj:shouldShowLock() then ret[#ret + 1] = tostring( (yesno(args.small) and Padlock or Banner) .new(protectionObj, blurbObj, cfg) ) end end -- Render the categories if yesno(args.category) ~= false then ret[#ret + 1] = protectionObj:makeCategoryLinks() end return table.concat(ret) end function p.main(frame, cfg) cfg = cfg or require(CONFIG_MODULE) -- Find default args, if any. local parent = frame.getParent and frame:getParent() local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')] -- Find user args, and use the parent frame if we are being called from a -- wrapper template. getArgs = getArgs or require('Module:Arguments').getArgs local userArgs = getArgs(frame, { parentOnly = defaultArgs, frameOnly = not defaultArgs }) -- Build the args table. User-specified args overwrite default args. local args = {} for k, v in pairs(defaultArgs or {}) do args[k] = v end for k, v in pairs(userArgs) do args[k] = v end return p._main(args, cfg) end return p 894f0884d4c2da1ce19d385b96f59af654b0946a Module:Italic title 828 206 574 2022-10-21T21:17:12Z en>Legoktm 0 Replace [[Module:No globals]] with require( "strict" ) Scribunto text/plain -- This module implements {{italic title}}. require('strict') local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local yesno = require('Module:Yesno') -------------------------------------------------------------------------------- -- ItalicTitle class -------------------------------------------------------------------------------- local ItalicTitle = {} do ---------------------------------------------------------------------------- -- Class attributes and functions -- Things that belong to the class are here. Things that belong to each -- object are in the constructor. ---------------------------------------------------------------------------- -- Keys of title parts that can be italicized. local italicizableKeys = { namespace = true, title = true, dab = true, } ---------------------------------------------------------------------------- -- ItalicTitle constructor -- This contains all the dynamic attributes and methods. ---------------------------------------------------------------------------- function ItalicTitle.new() local obj = {} -- Function for checking self variable in methods. local checkSelf = libraryUtil.makeCheckSelfFunction( 'ItalicTitle', 'obj', obj, 'ItalicTitle object' ) -- Checks a key is present in a lookup table. -- Param: name - the function name. -- Param: argId - integer position of the key in the argument list. -- Param: key - the key. -- Param: lookupTable - the table to look the key up in. local function checkKey(name, argId, key, lookupTable) if not lookupTable[key] then error(string.format( "bad argument #%d to '%s' ('%s' is not a valid key)", argId, name, key ), 3) end end -- Set up object structure. local parsed = false local categories = {} local italicizedKeys = {} local italicizedSubstrings = {} -- Parses a title object into its namespace text, title, and -- disambiguation text. -- Param: options - a table of options with the following keys: -- title - the title object to parse -- ignoreDab - ignore any disambiguation parentheses -- Returns the current object. function obj:parseTitle(options) checkSelf(self, 'parseTitle') checkType('parseTitle', 1, options, 'table') checkTypeForNamedArg('parseTitle', 'title', options.title, 'table') local title = options.title -- Title and dab text local prefix, parentheses if not options.ignoreDab then prefix, parentheses = mw.ustring.match( title.text, '^(.+) %(([^%(%)]+)%)$' ) end if prefix and parentheses then self.title = prefix self.dab = parentheses else self.title = title.text end -- Namespace local namespace = mw.site.namespaces[title.namespace].name if namespace and #namespace >= 1 then self.namespace = namespace end -- Register the object as having parsed a title. parsed = true return self end -- Italicizes part of the title. -- Param: key - the key of the title part to be italicized. Possible -- keys are contained in the italicizableKeys table. -- Returns the current object. function obj:italicize(key) checkSelf(self, 'italicize') checkType('italicize', 1, key, 'string') checkKey('italicize', 1, key, italicizableKeys) italicizedKeys[key] = true return self end -- Un-italicizes part of the title. -- Param: key - the key of the title part to be un-italicized. Possible -- keys are contained in the italicizableKeys table. -- Returns the current object. function obj:unitalicize(key) checkSelf(self, 'unitalicize') checkType('unitalicize', 1, key, 'string') checkKey('unitalicize', 1, key, italicizableKeys) italicizedKeys[key] = nil return self end -- Italicizes a substring in the title. This only affects the main part -- of the title, not the namespace or the disambiguation text. -- Param: s - the substring to be italicized. -- Returns the current object. function obj:italicizeSubstring(s) checkSelf(self, 'italicizeSubstring') checkType('italicizeSubstring', 1, s, 'string') italicizedSubstrings[s] = true return self end -- Un-italicizes a substring in the title. This only affects the main -- part of the title, not the namespace or the disambiguation text. -- Param: s - the substring to be un-italicized. -- Returns the current object. function obj:unitalicizeSubstring(s) checkSelf(self, 'unitalicizeSubstring') checkType('unitalicizeSubstring', 1, s, 'string') italicizedSubstrings[s] = nil return self end -- Renders the object into a page name. If no title has yet been parsed, -- the current title is used. -- Returns string function obj:renderTitle() checkSelf(self, 'renderTitle') -- Italicizes a string -- Param: s - the string to italicize -- Returns string. local function italicize(s) assert(type(s) == 'string', 's was not a string') assert(s ~= '', 's was the empty string') return string.format('<i>%s</i>', s) end -- Escape characters in a string that are magic in Lua patterns. -- Param: pattern - the pattern to escape -- Returns string. local function escapeMagicCharacters(s) assert(type(s) == 'string', 's was not a string') return s:gsub('%p', '%%%0') end -- If a title hasn't been parsed yet, parse the current title. if not parsed then self:parseTitle{title = mw.title.getCurrentTitle()} end -- Italicize the different parts of the title and store them in a -- titleParts table to be joined together later. local titleParts = {} -- Italicize the italicizable keys. for key in pairs(italicizableKeys) do if self[key] then if italicizedKeys[key] then titleParts[key] = italicize(self[key]) else titleParts[key] = self[key] end end end -- Italicize substrings. If there are any substrings to be -- italicized then start from the raw title, as this overrides any -- italicization of the main part of the title. if next(italicizedSubstrings) then titleParts.title = self.title for s in pairs(italicizedSubstrings) do local pattern = escapeMagicCharacters(s) local italicizedTitle, nReplacements = titleParts.title:gsub( pattern, italicize ) titleParts.title = italicizedTitle -- If we didn't make any replacements then it means that we -- have been passed a bad substring or that the page has -- been moved to a bad title, so add a tracking category. if nReplacements < 1 then categories['Pages using italic title with no matching string'] = true end end end -- Assemble the title together from the parts. local ret = '' if titleParts.namespace then ret = ret .. titleParts.namespace .. ':' end ret = ret .. titleParts.title if titleParts.dab then ret = ret .. ' (' .. titleParts.dab .. ')' end return ret end -- Returns an expanded DISPLAYTITLE parser function called with the -- result of obj:renderTitle, plus any other optional arguments. -- Returns string function obj:renderDisplayTitle(...) checkSelf(self, 'renderDisplayTitle') return mw.getCurrentFrame():callParserFunction( 'DISPLAYTITLE', self:renderTitle(), ... ) end -- Returns an expanded DISPLAYTITLE parser function called with the -- result of obj:renderTitle, plus any other optional arguments, plus -- any tracking categories. -- Returns string function obj:render(...) checkSelf(self, 'render') local ret = self:renderDisplayTitle(...) for cat in pairs(categories) do ret = ret .. string.format( '[[Category:%s]]', cat ) end return ret end return obj end end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} local function getArgs(frame, wrapper) assert(type(wrapper) == 'string', 'wrapper was not a string') return require('Module:Arguments').getArgs(frame, { wrappers = wrapper }) end -- Main function for {{italic title}} function p._main(args) checkType('_main', 1, args, 'table') local italicTitle = ItalicTitle.new() italicTitle:parseTitle{ title = mw.title.getCurrentTitle(), ignoreDab = yesno(args.all, false) } if args.string then italicTitle:italicizeSubstring(args.string) else italicTitle:italicize('title') end return italicTitle:render(args[1]) end function p.main(frame) return p._main(getArgs(frame, 'Template:Italic title')) end function p._dabonly(args) return ItalicTitle.new() :italicize('dab') :render(args[1]) end function p.dabonly(frame) return p._dabonly(getArgs(frame, 'Template:Italic dab')) end return p 9b49016c8f526f680e9ecdaf36ec4ceafda2a2f8 Module:Message box 828 55 448 152 2022-10-23T04:26:44Z en>Legoktm 0 Replace [[Module:No globals]] with require( "strict" ) Scribunto text/plain require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage or 'Imbox notice.png', imageSize) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) bdb0ecc9f26f26b9c0ce12a066a183ac9d4f0705 Module:Transclusion count 828 114 466 287 2022-11-11T07:41:32Z en>Aidan9382 0 Remove any Template: namespace designation from the demo arg Scribunto text/plain local p = {} function p.fetch(frame) local template = nil local return_value = nil -- Use demo parameter if it exists, otherswise use current template name local namespace = mw.title.getCurrentTitle().namespace if frame.args["demo"] and frame.args["demo"] ~= "" then template = mw.ustring.gsub(frame.args["demo"],"^[Tt]emplate:","") elseif namespace == 10 then -- Template namespace template = mw.title.getCurrentTitle().text elseif namespace == 828 then -- Module namespace template = (mw.site.namespaces[828].name .. ":" .. mw.title.getCurrentTitle().text) end -- If in template or module namespace, look up count in /data if template ~= nil then namespace = mw.title.new(template, "Template").namespace if namespace == 10 or namespace == 828 then template = mw.ustring.gsub(template, "/doc$", "") -- strip /doc from end template = mw.ustring.gsub(template, "/sandbox$", "") -- strip /sandbox from end local index = mw.ustring.sub(mw.title.new(template).text,1,1) local status, data = pcall(function () return(mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other"))) end) if status then return_value = tonumber(data[mw.ustring.gsub(template, " ", "_")]) end end end -- If database value doesn't exist, use value passed to template if return_value == nil and frame.args[1] ~= nil then local arg1=mw.ustring.match(frame.args[1], '[%d,]+') if arg1 and arg1 ~= '' then return_value = tonumber(frame:callParserFunction('formatnum', arg1, 'R')) end end return return_value end -- Tabulate this data for [[Wikipedia:Database reports/Templates transcluded on the most pages]] function p.tabulate(frame) local list = {} for i = 65, 91 do local data = mw.loadData('Module:Transclusion count/data/' .. ((i == 91) and 'other' or string.char(i))) for name, count in pairs(data) do table.insert(list, {mw.title.new(name, "Template").fullText, count}) end end table.sort(list, function(a, b) return (a[2] == b[2]) and (a[1] < b[1]) or (a[2] > b[2]) end) local lang = mw.getContentLanguage(); for i = 1, #list do list[i] = ('|-\n| %d || [[%s]] || %s\n'):format(i, list[i][1]:gsub('_', ' '), lang:formatNum(list[i][2])) end return table.concat(list) end return p 000ef6bcbf7b66e727870b0c300c4009da300513 Template:Organization infoboxes 10 87 556 227 2022-11-21T13:05:35Z en>Ingenuity 0 Reverted edits by [[Special:Contribs/Nurmohammad1971|Nurmohammad1971]] ([[User talk:Nurmohammad1971|talk]]) to last version by Hey man im josh wikitext text/x-wiki {{Navbox | name = Organization infoboxes | state = {{{state<includeonly>|expanded</includeonly>}}} | bodyclass = hlist | title = [[Wikipedia:Template index|Wikipedia templates]]: [[organization]] [[Template:Infobox|infoboxes]] | above = [[Wikipedia:Manual of Style/Infoboxes]] | group1 = General | list1 = * {{Tl|Infobox organization}} * {{Tl|Infobox official post}} * {{tl|Infobox criminal organization}} * {{tl|Infobox fictional organisation}} | group2 = {{longitem|Government<br/>and politics}} | list2 = * {{Tl|Infobox government}} * {{Tl|Infobox government agency}} * {{Tl|Infobox legislature}} * {{Tl|Infobox political party}} * {{Tl|Infobox court}} * {{Tl|Infobox detention facility}} * {{tl|Infobox fire department}} * {{Tl|Infobox law enforcement agency}} * {{Tl|Infobox space agency}} | group3 = Military | list3 = * {{Tl|Infobox national military}} * {{Tl|Infobox military unit}} * {{tl|Infobox military rank}} * {{Tl|Infobox military gear}} | group4 = Religion | list4 = * {{Tl|Infobox religious group}} * {{Tl|Infobox Christian denomination}} * {{Tl|Infobox diocese}} * {{Tl|Infobox church}} * {{Tl|Infobox monastery}} | group5 = People | list5 = * {{Tl|Infobox ethnic group}} * {{Tl|Infobox caste}} * {{Tl|Infobox clan}} * {{Tl|Infobox family}} * {{Tl|Infobox iwi}} * {{Tl|Infobox hereditary title}} * {{Tl|Infobox monarchy}} * {{Tl|Infobox officeholder}} * {{Tl|Infobox tribe}} | group6 = {{longitem|Typically<br/>non-profit}} | list6 = * {{tl|Infobox hospital}} * {{Tl|Infobox institute}} * {{Tl|Infobox laboratory}}{{smallsup|1}} * {{tl|Infobox museum}} * {{Tl|Infobox observatory}} * {{Tl|Infobox school}} * {{tl|Infobox school district}} * {{Tl|Infobox university}}{{smallsup|2}} | group7 = Publications | list7 = * {{Tl|Infobox journal}} * {{Tl|Infobox magazine}} * {{Tl|Infobox newspaper}} * {{Tl|Infobox publisher}} | group8 = Business | list8 = * {{Tl|Infobox company}} * {{tl|Infobox brewery}} * {{Tl|Infobox law firm}} * {{tl|Infobox restaurant}} * {{tl|Infobox website}} – ''type of business or publication'' | group9 = Distinctions | list9 = * {{Tl|Infobox order}} * {{Tl|Infobox fraternity}} * {{Tl|Infobox Grand Lodge}} | group10 = Subtemplates | list10 = * '''Coordinates'''&nbsp;{{Tl|coord}} * '''Dates''' ** {{Tl|start date}}}—for {{para|established}}, {{para|founded}}, {{para|opened}} etc. ** {{Tl|end date}}}—for {{para|dissolved}}, {{para|defunct}} * '''Lists''' **{{tl|plainlist}} ** {{tl|flatlist}} ** {{tl|unbulleted list}} * '''Non-English text'''&nbsp;{{Tl|lang}} * '''Website''' ** {{tl|URL}} ** {{tl|Official URL}} ** {{tl|Official website}} * '''Documentation''' ** &nbsp;{{Tl|mf-adr}}}—Address ** &nbsp;{{Tl|UF-hcard-org}}—[[Microformat]]/metadata | below = * {{smallsup|1}} or research institution * {{smallsup|2}} or college * [[:Category:Infobox templates|Category]] * [[Help:Infobox|Help]] * [[Wikipedia:List of infoboxes|List of infoboxes]] }}<noinclude>{{documentation}}</noinclude> 46b42f8c246498861fbe37c456b35324d6642992 Template:Longitem 10 84 530 221 2022-11-25T15:27:08Z en>Neveselbert 0 syntax wikitext text/x-wiki <noinclude>{{#tag:syntaxhighlight| </noinclude>{{#ifeq: {{{1|+}}} | {{{1|-}}} | {{#if: {{{1|}}} | <div style="display: inline-block; line-height: 1.2em; padding: .1em 0;{{#if:{{{style|}}} | {{{style|}}}}}">{{{1|}}}</div><includeonly>{{#if:{{{2|}}}|[[Category:Pages using Template:Longitem with unnamed style parameter]]}}</includeonly> }} | line-height: 1.2em; padding: .1em 0; }}<noinclude> |lang=python}} {{documentation}} </noinclude> 11b1fe9bc23a82dd5ae78e742d4656024348236b Template:Hidden end 10 14 578 24 2022-12-12T14:54:45Z en>Terasail 0 Only noinclude once wikitext text/x-wiki <includeonly></div></div></includeonly><noinclude> {{hatnote|Templates {{noredirect|Template:End hidden|End hidden}} and {{noredirect|Template:End hidden section|End hidden section}} redirect here.}} {{Documentation|Template:Hidden begin/doc}} </noinclude> 6cc7eb4776ef10092d5f7d48da123117e7b430b2 Template:Hidden begin 10 13 576 22 2022-12-13T16:00:54Z en>Terasail 0 Remove tracking now that parameters have been removed from transclusions wikitext text/x-wiki <includeonly><templatestyles src="Template:Hidden begin/styles.css"/><div class="hidden-begin mw-collapsible {{#ifeq:{{{showhide|{{{toggle}}}}}}|left|mw-collapsible-leftside-toggle}} {{#if:{{{expanded|}}}||mw-collapsed}} {{{class|}}}" style="{{#if:{{{width|}}}|width:{{{width}}};}} {{#if:{{{border|}}}|border:{{{border}}};}} {{#if:{{{bgcolor|}}}|background-color:{{{bgcolor}}};}} {{{style|}}}"><!-- --><div class="hidden-title" style="{{#if:{{{ta1|}}}|text-align:{{{ta1}}};}} {{#if:{{{titlebgcolor|}}}|background-color:{{{titlebgcolor}}};}} {{{titlestyle|}}}">{{{title|{{{header|}}}}}}</div><!-- --><div class="hidden-content mw-collapsible-content" style="{{#if:{{{ta2|}}}|text-align:{{{ta2}}};}} {{#if:{{{contentbgcolor|}}}|background-color:{{{contentbgcolor}}};}} {{{contentstyle|{{{bodystyle|}}}}}}"><!-- Content added after the template --></includeonly><noinclude> {{Documentation}} </noinclude> be0f4e092203b931810fbff9ed6a1b7af51c025f Template:Hidden begin/styles.css 10 214 594 2022-12-15T21:41:20Z en>Pppery 0 Protection template sanitized-css text/css /* {{pp-template}} */ .hidden-begin { box-sizing: border-box; width: 100%; padding: 5px; border: none; font-size: 95%; } .hidden-title { font-weight: bold; line-height: 1.6; text-align: left; } .hidden-content { text-align: left; } d4ab5680ca52bee10cfd2992f2adc45452c5ab37 Template:Mbox 10 22 562 40 2022-12-18T05:46:16Z en>TadejM 0 wikitext text/x-wiki {{#invoke:Message box|mbox}}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 5bfb2becf8bed35974b47e3ff8660dc14bee40c7 Template:Hlist/styles.css 10 201 560 2022-12-26T18:00:17Z en>Izno 0 actually remove that block, someone can dig for authorship sanitized-css text/css /* {{pp-protected|reason=match parent|small=yes}} */ /* * hlist styles are defined in core and Minerva and differ in Minerva. The * current definitions here (2023-01-01) are sufficient to override Minerva * without use of the hlist-separated class. The most problematic styles were * related to margin, padding, and the bullet. Check files listed at * [[MediaWiki talk:Common.css/to do#hlist-separated]] */ /* * TODO: When the majority of readership supports it (or some beautiful world * in which grade C support is above the minimum threshold), use :is() */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { /* * don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again * We also want to reset margin-right in Minerva */ margin: 0; display: inline; } /* Display requested top-level lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, /* Display nested lists inline */ .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* TODO: :not() can maybe be used here to remove the later rule. naive test * seems to work. more testing needed. like so: *.hlist dt:not(:last-child)::after { * content: ": "; *} *.hlist dd:not(:last-child)::after, *.hlist li:not(:last-child)::after { * content: " · "; * font-weight: bold; *} */ /* Generate interpuncts */ .hlist dt::after { content: ": "; } .hlist dd::after, .hlist li::after { content: " · "; font-weight: bold; } .hlist dd:last-child::after, .hlist dt:last-child::after, .hlist li:last-child::after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child::before, .hlist dd dt:first-child::before, .hlist dd li:first-child::before, .hlist dt dd:first-child::before, .hlist dt dt:first-child::before, .hlist dt li:first-child::before, .hlist li dd:first-child::before, .hlist li dt:first-child::before, .hlist li li:first-child::before { content: " ("; font-weight: normal; } .hlist dd dd:last-child::after, .hlist dd dt:last-child::after, .hlist dd li:last-child::after, .hlist dt dd:last-child::after, .hlist dt dt:last-child::after, .hlist dt li:last-child::after, .hlist li dd:last-child::after, .hlist li dt:last-child::after, .hlist li li:last-child::after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li::before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child::before, .hlist dt ol > li:first-child::before, .hlist li ol > li:first-child::before { content: " (" counter(listitem) "\a0"; } 8c9dd9c9c00f30eead17fe10f51d183333e81f33 Module:Infobox 828 50 524 184 2022-12-27T21:29:12Z en>Izno 0 merge hlist here Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local lists = { plainlist_t = { patterns = { '^plainlist$', '%splainlist$', '^plainlist%s', '%splainlist%s' }, found = false, styles = 'Plainlist/styles.css' }, hlist_t = { patterns = { '^hlist$', '%shlist$', '^hlist%s', '%shlist%s' }, found = false, styles = 'Hlist/styles.css' } } local function has_list_class(args_to_check) for _, list in pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg or '', pattern) then list.found = true break end end if list.found then break end end end end end local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class, args.headerclass }) root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class }) local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true has_list_class({args.titleclass}) root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true has_list_class({ args.aboveclass }) root :tag('tr') :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true has_list_class({ args.belowclass }) root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ subheaderArgs.rowclass, subheaderArgs.class }) local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ imageArgs.rowclass, imageArgs.class }) local row = root:tag('tr') row:addClass(imageArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(require('Module:Italic title')._main({})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if args.decat == 'yes' then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() local hlist_templatestyles = '' if lists.hlist_t.found then hlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.hlist_t.styles } } end local plainlist_templatestyles = '' if lists.plainlist_t.found then plainlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.plainlist_t.styles } } end -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ -- hlist -> plainlist -> base is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because the rows of interest invoking -- each class may not be on a specific page hlist_templatestyles, plainlist_templatestyles, base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) has_list_class({ args.bodyclass }) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p 0ddb7e5c8426d67cd589b710efb9912ddfb67fea Module:List 828 53 450 102 2022-12-29T17:57:56Z en>Izno 0 add templatestyles for hlist Scribunto text/plain local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes and TemplateStyles data.classes = {} data.templatestyles = '' if listType == 'horizontal' or listType == 'horizontal_ordered' then table.insert(data.classes, 'hlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Hlist/styles.css' } } elseif listType == 'unbulleted' then table.insert(data.classes, 'plainlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Plainlist/styles.css' } } end table.insert(data.classes, args.class) -- Main div style data.style = args.style -- Indent for horizontal lists if listType == 'horizontal' or listType == 'horizontal_ordered' then local indent = tonumber(args.indent) indent = indent and indent * 1.6 or 0 if indent > 0 then data.marginLeft = indent .. 'em' end end -- List style types for ordered lists -- This could be "1, 2, 3", "a, b, c", or a number of others. The list style -- type is either set by the "type" attribute or the "list-style-type" CSS -- property. if listType == 'ordered' or listType == 'horizontal_ordered' then data.listStyleType = args.list_style_type or args['list-style-type'] data.type = args['type'] -- Detect invalid type attributes and attempt to convert them to -- list-style-type CSS properties. if data.type and not data.listStyleType and not tostring(data.type):find('^%s*[1AaIi]%s*$') then data.listStyleType = data.type data.type = nil end end -- List tag type if listType == 'ordered' or listType == 'horizontal_ordered' then data.listTag = 'ol' else data.listTag = 'ul' end -- Start number for ordered lists data.start = args.start if listType == 'horizontal_ordered' then -- Apply fix to get start numbers working with horizontal ordered lists. local startNum = tonumber(data.start) if startNum then data.counterReset = 'listitem ' .. tostring(startNum - 1) end end -- List style -- ul_style and ol_style are included for backwards compatibility. No -- distinction is made for ordered or unordered lists. data.listStyle = args.list_style -- List items -- li_style is included for backwards compatibility. item_style was included -- to be easier to understand for non-coders. data.itemStyle = args.item_style or args.li_style data.items = {} for _, num in ipairs(mTableTools.numKeys(args)) do local item = {} item.content = args[num] item.style = args['item' .. tostring(num) .. '_style'] or args['item_style' .. tostring(num)] item.value = args['item' .. tostring(num) .. '_value'] or args['item_value' .. tostring(num)] table.insert(data.items, item) end return data end function p.renderList(data) -- Renders the list HTML. -- Return the blank string if there are no list items. if type(data.items) ~= 'table' or #data.items < 1 then return '' end -- Render the main div tag. local root = mw.html.create('div') for _, class in ipairs(data.classes or {}) do root:addClass(class) end root:css{['margin-left'] = data.marginLeft} if data.style then root:cssText(data.style) end -- Render the list tag. local list = root:tag(data.listTag or 'ul') list :attr{start = data.start, type = data.type} :css{ ['counter-reset'] = data.counterReset, ['list-style-type'] = data.listStyleType } if data.listStyle then list:cssText(data.listStyle) end -- Render the list items for _, t in ipairs(data.items or {}) do local item = list:tag('li') if data.itemStyle then item:cssText(data.itemStyle) end if t.style then item:cssText(t.style) end item :attr{value = t.value} :wikitext(t.content) end return data.templatestyles .. tostring(root) end function p.renderTrackingCategories(args) local isDeprecated = false -- Tracks deprecated parameters. for k, v in pairs(args) do k = tostring(k) if k:find('^item_style%d+$') or k:find('^item_value%d+$') then isDeprecated = true break end end local ret = '' if isDeprecated then ret = ret .. '[[Category:List templates with deprecated parameters]]' end return ret end function p.makeList(listType, args) if not listType or not listTypes[listType] then error(string.format( "bad argument #1 to 'makeList' ('%s' is not a valid list type)", tostring(listType) ), 2) end checkType('makeList', 2, args, 'table') local data = p.makeListData(listType, args) local list = p.renderList(data) local trackingCategories = p.renderTrackingCategories(args) return list .. trackingCategories end for listType in pairs(listTypes) do p[listType] = function (frame) local mArguments = require('Module:Arguments') local origArgs = mArguments.getArgs(frame, { valueFunc = function (key, value) if not value or not mw.ustring.find(value, '%S') then return nil end if mw.ustring.find(value, '^%s*[%*#;:]') then return value else return value:match('^%s*(.-)%s*$') end return nil end }) -- Copy all the arguments to a new table, for faster indexing. local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.makeList(listType, args) end end return p 7a4f36a6e9cd56370bdd8207d23694124821dc1a 451 450 2023-03-27T13:45:56Z 17ademoladav 2 1 revision imported Scribunto text/plain local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes and TemplateStyles data.classes = {} data.templatestyles = '' if listType == 'horizontal' or listType == 'horizontal_ordered' then table.insert(data.classes, 'hlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Hlist/styles.css' } } elseif listType == 'unbulleted' then table.insert(data.classes, 'plainlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Plainlist/styles.css' } } end table.insert(data.classes, args.class) -- Main div style data.style = args.style -- Indent for horizontal lists if listType == 'horizontal' or listType == 'horizontal_ordered' then local indent = tonumber(args.indent) indent = indent and indent * 1.6 or 0 if indent > 0 then data.marginLeft = indent .. 'em' end end -- List style types for ordered lists -- This could be "1, 2, 3", "a, b, c", or a number of others. The list style -- type is either set by the "type" attribute or the "list-style-type" CSS -- property. if listType == 'ordered' or listType == 'horizontal_ordered' then data.listStyleType = args.list_style_type or args['list-style-type'] data.type = args['type'] -- Detect invalid type attributes and attempt to convert them to -- list-style-type CSS properties. if data.type and not data.listStyleType and not tostring(data.type):find('^%s*[1AaIi]%s*$') then data.listStyleType = data.type data.type = nil end end -- List tag type if listType == 'ordered' or listType == 'horizontal_ordered' then data.listTag = 'ol' else data.listTag = 'ul' end -- Start number for ordered lists data.start = args.start if listType == 'horizontal_ordered' then -- Apply fix to get start numbers working with horizontal ordered lists. local startNum = tonumber(data.start) if startNum then data.counterReset = 'listitem ' .. tostring(startNum - 1) end end -- List style -- ul_style and ol_style are included for backwards compatibility. No -- distinction is made for ordered or unordered lists. data.listStyle = args.list_style -- List items -- li_style is included for backwards compatibility. item_style was included -- to be easier to understand for non-coders. data.itemStyle = args.item_style or args.li_style data.items = {} for _, num in ipairs(mTableTools.numKeys(args)) do local item = {} item.content = args[num] item.style = args['item' .. tostring(num) .. '_style'] or args['item_style' .. tostring(num)] item.value = args['item' .. tostring(num) .. '_value'] or args['item_value' .. tostring(num)] table.insert(data.items, item) end return data end function p.renderList(data) -- Renders the list HTML. -- Return the blank string if there are no list items. if type(data.items) ~= 'table' or #data.items < 1 then return '' end -- Render the main div tag. local root = mw.html.create('div') for _, class in ipairs(data.classes or {}) do root:addClass(class) end root:css{['margin-left'] = data.marginLeft} if data.style then root:cssText(data.style) end -- Render the list tag. local list = root:tag(data.listTag or 'ul') list :attr{start = data.start, type = data.type} :css{ ['counter-reset'] = data.counterReset, ['list-style-type'] = data.listStyleType } if data.listStyle then list:cssText(data.listStyle) end -- Render the list items for _, t in ipairs(data.items or {}) do local item = list:tag('li') if data.itemStyle then item:cssText(data.itemStyle) end if t.style then item:cssText(t.style) end item :attr{value = t.value} :wikitext(t.content) end return data.templatestyles .. tostring(root) end function p.renderTrackingCategories(args) local isDeprecated = false -- Tracks deprecated parameters. for k, v in pairs(args) do k = tostring(k) if k:find('^item_style%d+$') or k:find('^item_value%d+$') then isDeprecated = true break end end local ret = '' if isDeprecated then ret = ret .. '[[Category:List templates with deprecated parameters]]' end return ret end function p.makeList(listType, args) if not listType or not listTypes[listType] then error(string.format( "bad argument #1 to 'makeList' ('%s' is not a valid list type)", tostring(listType) ), 2) end checkType('makeList', 2, args, 'table') local data = p.makeListData(listType, args) local list = p.renderList(data) local trackingCategories = p.renderTrackingCategories(args) return list .. trackingCategories end for listType in pairs(listTypes) do p[listType] = function (frame) local mArguments = require('Module:Arguments') local origArgs = mArguments.getArgs(frame, { valueFunc = function (key, value) if not value or not mw.ustring.find(value, '%S') then return nil end if mw.ustring.find(value, '^%s*[%*#;:]') then return value else return value:match('^%s*(.-)%s*$') end return nil end }) -- Copy all the arguments to a new table, for faster indexing. local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.makeList(listType, args) end end return p 7a4f36a6e9cd56370bdd8207d23694124821dc1a Module:Navbox 828 101 536 261 2022-12-29T18:13:14Z en>Izno 0 add hlist support, move related strings to cfg, add support for finding classes in any class parameter Scribunto text/plain local p = {} local navbar = require('Module:Navbar')._navbar local cfg = mw.loadData('Module:Navbox/configuration') local getArgs -- lazily initialized local args local format = string.format local function striped(wikitext, border) -- Return wikitext with markers replaced for odd/even striping. -- Child (subgroup) navboxes are flagged with a category that is removed -- by parent navboxes. The result is that the category shows all pages -- where a child navbox is not contained in a parent navbox. local orphanCat = cfg.category.orphan if border == cfg.keyword.border_subgroup and args[cfg.arg.orphan] ~= cfg.keyword.orphan_yes then -- No change; striping occurs in outermost navbox. return wikitext .. orphanCat end local first, second = cfg.class.navbox_odd_part, cfg.class.navbox_even_part if args[cfg.arg.evenodd] then if args[cfg.arg.evenodd] == cfg.keyword.evenodd_swap then first, second = second, first else first = args[cfg.arg.evenodd] second = first end end local changer if first == second then changer = first else local index = 0 changer = function (code) if code == '0' then -- Current occurrence is for a group before a nested table. -- Set it to first as a valid although pointless class. -- The next occurrence will be the first row after a title -- in a subgroup and will also be first. index = 0 return first end index = index + 1 return index % 2 == 1 and first or second end end local regex = orphanCat:gsub('([%[%]])', '%%%1') return (wikitext:gsub(regex, ''):gsub(cfg.marker.regex, changer)) -- () omits gsub count end local function processItem(item, nowrapitems) if item:sub(1, 2) == '{|' then -- Applying nowrap to lines in a table does not make sense. -- Add newlines to compensate for trim of x in |parm=x in a template. return '\n' .. item ..'\n' end if nowrapitems == cfg.keyword.nowrapitems_yes then local lines = {} for line in (item .. '\n'):gmatch('([^\n]*)\n') do local prefix, content = line:match('^([*:;#]+)%s*(.*)') if prefix and not content:match(cfg.pattern.nowrap) then line = format(cfg.nowrap_item, prefix, content) end table.insert(lines, line) end item = table.concat(lines, '\n') end if item:match('^[*:;#]') then return '\n' .. item ..'\n' end return item end local function has_navbar() return args[cfg.arg.navbar] ~= cfg.keyword.navbar_off and args[cfg.arg.navbar] ~= cfg.keyword.navbar_plain and ( args[cfg.arg.name] or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.pattern.sandbox, '') ~= cfg.pattern.navbox ) end local function renderNavBar(titleCell) if has_navbar() then titleCell:wikitext(navbar{ [cfg.navbar.name] = args[cfg.arg.name], [cfg.navbar.mini] = 1, [cfg.navbar.fontstyle] = (args[cfg.arg.basestyle] or '') .. ';' .. (args[cfg.arg.titlestyle] or '') .. ';background:none transparent;border:none;box-shadow:none;padding:0;' }) end end local function renderTitleRow(tbl) if not args[cfg.arg.title] then return end local titleRow = tbl:tag('tr') local titleCell = titleRow:tag('th'):attr('scope', 'col') local titleColspan = 2 if args[cfg.arg.imageleft] then titleColspan = titleColspan + 1 end if args[cfg.arg.image] then titleColspan = titleColspan + 1 end titleCell :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.titlestyle]) :addClass(cfg.class.navbox_title) :attr('colspan', titleColspan) renderNavBar(titleCell) titleCell :tag('div') -- id for aria-labelledby attribute :attr('id', mw.uri.anchorEncode(args[cfg.arg.title])) :addClass(args[cfg.arg.titleclass]) :css('font-size', '114%') :css('margin', '0 4em') :wikitext(processItem(args[cfg.arg.title])) end local function getAboveBelowColspan() local ret = 2 if args[cfg.arg.imageleft] then ret = ret + 1 end if args[cfg.arg.image] then ret = ret + 1 end return ret end local function renderAboveRow(tbl) if not args[cfg.arg.above] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.aboveclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.abovestyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') -- id for aria-labelledby attribute, if no title :attr('id', args[cfg.arg.title] and nil or mw.uri.anchorEncode(args[cfg.arg.above])) :wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems])) end local function renderBelowRow(tbl) if not args[cfg.arg.below] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.belowclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.belowstyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') :wikitext(processItem(args[cfg.arg.below], args[cfg.arg.nowrapitems])) end local function renderListRow(tbl, index, listnum, listnums_size) local row = tbl:tag('tr') if index == 1 and args[cfg.arg.imageleft] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 2px 0 0') :cssText(args[cfg.arg.imageleftstyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.imageleft])) end local group_and_num = format(cfg.arg.group_and_num, listnum) local groupstyle_and_num = format(cfg.arg.groupstyle_and_num, listnum) if args[group_and_num] then local groupCell = row:tag('th') -- id for aria-labelledby attribute, if lone group with no title or above if listnum == 1 and not (args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group2]) then groupCell :attr('id', mw.uri.anchorEncode(args[cfg.arg.group1])) end groupCell :attr('scope', 'row') :addClass(cfg.class.navbox_group) :addClass(args[cfg.arg.groupclass]) :cssText(args[cfg.arg.basestyle]) -- If groupwidth not specified, minimize width :css('width', args[cfg.arg.groupwidth] or '1%') groupCell :cssText(args[cfg.arg.groupstyle]) :cssText(args[groupstyle_and_num]) :wikitext(args[group_and_num]) end local listCell = row:tag('td') if args[group_and_num] then listCell :addClass(cfg.class.navbox_list_with_group) else listCell:attr('colspan', 2) end if not args[cfg.arg.groupwidth] then listCell:css('width', '100%') end local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing if index % 2 == 1 then rowstyle = args[cfg.arg.oddstyle] else rowstyle = args[cfg.arg.evenstyle] end local list_and_num = format(cfg.arg.list_and_num, listnum) local listText = args[list_and_num] local oddEven = cfg.marker.oddeven if listText:sub(1, 12) == '</div><table' then -- Assume list text is for a subgroup navbox so no automatic striping for this row. oddEven = listText:find(cfg.pattern.navbox_title) and cfg.marker.restart or cfg.class.navbox_odd_part end local liststyle_and_num = format(cfg.arg.liststyle_and_num, listnum) local listclass_and_num = format(cfg.arg.listclass_and_num, listnum) listCell :css('padding', '0') :cssText(args[cfg.arg.liststyle]) :cssText(rowstyle) :cssText(args[liststyle_and_num]) :addClass(cfg.class.navbox_list) :addClass(cfg.class.navbox_part .. oddEven) :addClass(args[cfg.arg.listclass]) :addClass(args[listclass_and_num]) :tag('div') :css('padding', (index == 1 and args[cfg.arg.list1padding]) or args[cfg.arg.listpadding] or '0 0.25em' ) :wikitext(processItem(listText, args[cfg.arg.nowrapitems])) if index == 1 and args[cfg.arg.image] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 0 0 2px') :cssText(args[cfg.arg.imagestyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.image])) end end local function has_list_class(htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, _ in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, cfg.pattern.class) then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles() local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local hlist_styles = add_list_templatestyles('hlist', cfg.hlist_templatestyles) local plainlist_styles = add_list_templatestyles('plainlist', cfg.plainlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar() and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because most navboxes will emit only -- one of these classes [hlist_note] return hlist_styles .. plainlist_styles end local function needsHorizontalLists(border) if border == cfg.keyword.border_subgroup or args[cfg.arg.tracking] == cfg.keyword.tracking_no then return false end return not has_list_class(cfg.pattern.hlist) and not has_list_class(cfg.pattern.plainlist) end local function hasBackgroundColors() for _, key in ipairs({cfg.arg.titlestyle, cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('background', 1, true) then return true end end return false end local function hasBorders() for _, key in ipairs({cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('border', 1, true) then return true end end return false end local function isIllegible() local styleratio = require('Module:Color contrast')._styleratio for key, style in pairs(args) do if tostring(key):match(cfg.pattern.style) then if styleratio{mw.text.unstripNoWiki(style)} < 4.5 then return true end end end return false end local function getTrackingCategories(border) local cats = {} if needsHorizontalLists(border) then table.insert(cats, cfg.category.horizontal_lists) end if hasBackgroundColors() then table.insert(cats, cfg.category.background_colors) end if isIllegible() then table.insert(cats, cfg.category.illegible) end if hasBorders() then table.insert(cats, cfg.category.borders) end return cats end local function renderTrackingCategories(builder, border) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 then return end -- not in template space local subpage = title.subpageText if subpage == cfg.keyword.subpage_doc or subpage == cfg.keyword.subpage_sandbox or subpage == cfg.keyword.subpage_testcases then return end for _, cat in ipairs(getTrackingCategories(border)) do builder:wikitext('[[Category:' .. cat .. ']]') end end local function renderMainTable(border, listnums) local tbl = mw.html.create('table') :addClass(cfg.class.nowraplinks) :addClass(args[cfg.arg.bodyclass]) local state = args[cfg.arg.state] if args[cfg.arg.title] and state ~= cfg.keyword.state_plain and state ~= cfg.keyword.state_off then if state == cfg.keyword.state_collapsed then state = cfg.class.collapsed end tbl :addClass(cfg.class.collapsible) :addClass(state or cfg.class.autocollapse) end tbl:css('border-spacing', 0) if border == cfg.keyword.border_subgroup or border == cfg.keyword.border_none then tbl :addClass(cfg.class.navbox_subgroup) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) else -- regular navbox - bodystyle and style will be applied to the wrapper table tbl :addClass(cfg.class.navbox_inner) :css('background', 'transparent') :css('color', 'inherit') end tbl:cssText(args[cfg.arg.innerstyle]) renderTitleRow(tbl) renderAboveRow(tbl) local listnums_size = #listnums for i, listnum in ipairs(listnums) do renderListRow(tbl, i, listnum, listnums_size) end renderBelowRow(tbl) return tbl end local function add_navbox_styles(hiding_templatestyles) local frame = mw.getCurrentFrame() -- This is a lambda so that it doesn't need the frame as a parameter local function add_user_styles(templatestyles) if templatestyles and templatestyles ~= '' then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } end return '' end -- get templatestyles. load base from config so that Lua only needs to do -- the work once of parser tag expansion local base_templatestyles = cfg.templatestyles local templatestyles = add_user_styles(args[cfg.arg.templatestyles]) local child_templatestyles = add_user_styles(args[cfg.arg.child_templatestyles]) -- The 'navbox-styles' div exists to wrap the styles to work around T200206 -- more elegantly. Instead of combinatorial rules, this ends up being linear -- number of CSS rules. return mw.html.create('div') :addClass(cfg.class.navbox_styles) :wikitext( add_list_styles() .. -- see [hlist_note] applied to 'before base_templatestyles' base_templatestyles .. templatestyles .. child_templatestyles .. table.concat(hiding_templatestyles) ) :done() end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gfind = string.gfind local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gfind(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end function p._navbox(navboxArgs) args = navboxArgs local hiding_templatestyles = move_hiding_templatestyles(args) local listnums = {} for k, _ in pairs(args) do if type(k) == 'string' then local listnum = k:match(cfg.pattern.listnum) if listnum then table.insert(listnums, tonumber(listnum)) end end end table.sort(listnums) local border = mw.text.trim(args[cfg.arg.border] or args[1] or '') if border == cfg.keyword.border_child then border = cfg.keyword.border_subgroup end -- render the main body of the navbox local tbl = renderMainTable(border, listnums) local res = mw.html.create() -- render the appropriate wrapper for the navbox, based on the border param if border == cfg.keyword.border_none then res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode( args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1] ) ) else nav:attr('aria-label', cfg.aria_label) end elseif border == cfg.keyword.border_subgroup then -- We assume that this navbox is being rendered in a list cell of a -- parent navbox, and is therefore inside a div with padding:0em 0.25em. -- We start with a </div> to avoid the padding being applied, and at the -- end add a <div> to balance out the parent's </div> res :wikitext('</div>') :node(tbl) :wikitext('<div>') else res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :addClass(cfg.class.navbox) :addClass(args[cfg.arg.navboxclass]) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) :css('padding', '3px') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode(args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1]) ) else nav:attr('aria-label', cfg.aria_label) end end if (args[cfg.arg.nocat] or cfg.keyword.nocat_false):lower() == cfg.keyword.nocat_false then renderTrackingCategories(res, border) end return striped(tostring(res), border) end function p.navbox(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end args = getArgs(frame, {wrappers = {cfg.pattern.navbox}}) -- Read the arguments in the order they'll be output in, to make references -- number in the right order. local _ _ = args[cfg.arg.title] _ = args[cfg.arg.above] -- Limit this to 20 as covering 'most' cases (that's a SWAG) and because -- iterator approach won't work here for i = 1, 20 do _ = args[format(cfg.arg.group_and_num, i)] _ = args[format(cfg.arg.list_and_num, i)] end _ = args[cfg.arg.below] return p._navbox(args) end return p fa2503f01f91840637f248e4dcbd1763b9cb3561 Module:Navbox/configuration 828 102 538 263 2022-12-29T18:14:27Z en>Izno 0 get these in Scribunto text/plain return { aria_label = 'Navbox', nowrap_item = '%s<span class="nowrap">%s</span>', templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' } }, hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', -- do not localize marker table marker = { oddeven = '\127_ODDEVEN_\127', restart = '\127_ODDEVEN0_\127', regex = '\127_ODDEVEN(%d?)_\127' }, category = { orphan = '[[Category:Navbox orphans]]', horizontal_lists = 'Navigational boxes without horizontal lists', background_colors = 'Navboxes using background colours', illegible = 'Potentially illegible navboxes', borders = 'Navboxes using borders', }, keyword = { border_subgroup = 'subgroup', border_child = 'child', border_none = 'none', evenodd_swap = 'swap', navbar_off = 'off', navbar_plain = 'plain', nocat_false = 'false', nowrapitems_yes = 'yes', orphan_yes = 'yes', state_collapsed = 'collapsed', state_off = 'off', state_plain = 'plain', subpage_doc = 'doc', subpage_sandbox = 'sandbox', subpage_testcases = 'testcases', tracking_no = 'no' }, class = { autocollapse = 'autocollapse', collapsible = 'mw-collapsible', collapsed = 'mw-collapsed', -- Warning navbox = 'navbox', -- WMF currently hides 'navbox' from mobile, -- so you probably shouldn't change the navbox class. navbox_abovebelow = 'navbox-abovebelow', navbox_group = 'navbox-group', navbox_image = 'navbox-image', navbox_inner = 'navbox-inner', navbox_list = 'navbox-list', navbox_list_with_group = 'navbox-list-with-group', navbox_part = 'navbox-', -- do not l10n navbox_styles = 'navbox-styles', navbox_subgroup = 'navbox-subgroup', navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below navbox_odd_part = 'odd', -- do not l10n navbox_even_part = 'even', -- do not l10n nomobile = 'nomobile', nowraplinks = 'nowraplinks', noviewer = 'noviewer' -- used to remove images from MediaViewer }, pattern = { listnum = '^list(%d+)$', class = 'class', sandbox = '/sandbox$', navbox = 'Template:Navbox', nowrap = '^<span class="nowrap">', style = 'style$', navbox_title = '<th[^>]*"navbox%-title"', hlist = 'hlist', plainlist = 'plainlist', }, arg = { above = 'above', aboveclass = 'aboveclass', abovestyle = 'abovestyle', basestyle = 'basestyle', bodyclass = 'bodyclass', bodystyle = 'bodystyle', border = 'border', below = 'below', belowclass = 'belowclass', belowstyle = 'belowstyle', evenodd = 'evenodd', evenstyle = 'evenstyle', group1 = 'group1', group2 = 'group2', group_and_num = 'group%d', groupstyle_and_num = 'group%dstyle', groupclass = 'groupclass', groupstyle = 'groupstyle', groupwidth = 'groupwidth', innerstyle = 'innerstyle', image = 'image', imageclass = 'imageclass', imageleft = 'imageleft', imageleftstyle = 'imageleftstyle', imagesetyle = 'imagestyle', list_and_num = 'list%d', listclass_and_num = 'list%dclass', liststyle_and_num = 'list%dstyle', list1padding = 'list1padding', listclass = 'listclass', listpadding = 'listpadding', liststyle = 'liststyle', name = 'name', navbar = 'navbar', navboxclass = 'navboxclass', nocat = 'nocat', nowrapitems = 'nowrapitems', oddstyle = 'oddstyle', orphan = 'orphan', state = 'state', style = 'style', templatestyles = 'templatestyles', child_templatestyles = 'child templatestyles', title = 'title', titleclass = 'titleclass', titlestyle = 'titlestyle', tracking = 'tracking' }, -- names of navbar arguments navbar = { name = 1, fontstyle = 'fontstyle', mini = 'mini' } } 4148736fd32a93636c0413e73ed38afaef065ec9 Module:Navbar/configuration 828 76 534 257 2022-12-29T18:18:21Z en>Izno 0 add hlist/styles.css Scribunto text/plain return { ['templatestyles'] = 'Module:Navbar/styles.css', ['hlist_templatestyles'] = 'Hlist/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['this_box'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } b007c336b17ec4bcd4d5a9dca9f8cba301662b55 Module:Navbar 828 75 532 255 2022-12-29T18:20:02Z en>Izno 0 add templatestyles for hlist Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '' -- TODO: Get link_descriptions and show into the configuration module. -- link_descriptions should be easier... local link_descriptions = { { ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template', ['link'] = title.fullText, ['url'] = false }, { ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template', ['link'] = talkpage, ['url'] = false }, { ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template', ['link'] = title:fullUrl('action=edit'), ['url'] = true }, { ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template', ['link'] = title:fullUrl('action=history'), ['url'] = true }, { ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template', ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, { ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template', ['link'] = title:fullUrl('action=watch'), ['url'] = true } } local ul = mw.html.create('ul') if has_brackets then ul:addClass(cfg.classes.brackets) :cssText(font_style) end for i, _ in ipairs(displayed_links) do if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end end return ul:done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end local frame = mw.getCurrentFrame() -- hlist -> navbar is best-effort to preserve old Common.css ordering. return frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } .. frame:extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p 79f907e59eaa8bbf8dd50bb751933ebeaaa7eb17 Template:Big 10 79 544 211 2023-01-16T00:50:52Z en>Jonesey95 0 merge per [[Wikipedia:Templates_for_discussion/Log/2023_January_7#Template:Larger|TFD]]. wikitext text/x-wiki #REDIRECT [[Template:Large]] f3ac156ee4257dea7f0243e0744b4d6d92927011 Template:Large 10 196 546 2023-01-16T01:12:34Z en>Jonesey95 0 use this template's own documentation wikitext text/x-wiki <span style="font-size:120%">{{{1}}}</span><noinclude> {{Documentation}} </noinclude> 8ba6ec8c3178e22dc1f05aa239df8a2b052be668 Template:Infobox court case/images 10 209 584 2023-01-18T22:54:59Z en>Paine Ellsworth 0 clarify wikitext text/x-wiki <includeonly>{{#switch:{{{courtimage|}}} <!--AUSTRALIA--> |[[High Court of Australia]] = Coat of Arms of Australia.svg |[[Federal Court of Australia]] = Coat of Arms of Australia.svg |[[Supreme Court of the Australian Capital Territory|Court of Appeal of the Australian Capital Territory]] |[[Supreme Court of the Australian Capital Territory]] = Coat of Arms of Canberra.svg |[[New South Wales Court of Appeal]] |[[New South Wales Court of Appeal|Court of Appeal of New South Wales]] |[[Supreme Court of New South Wales]] = New South Wales coa.png |[[Supreme Court of the Northern Territory|Court of Appeal of the Northern Territory]] = <!-- None --> |[[Supreme Court of the Northern Territory]] = Coat of arms of Northern Territory.png |[[Supreme Court of Queensland|Court of Appeal of Queensland]] |[[Supreme Court of Queensland]] = Coat of Arms of Queensland.svg |[[Supreme Court of South Australia]] = Supreme Court of South Australia.jpg |[[Supreme Court of Tasmania|Court of Appeal of Tasmania]] |[[Supreme Court of Tasmania]] = Tasmania Coat of Arms.svg |[[Supreme Court of Victoria|Court of Appeal of Victoria]] |[[Supreme Court of Victoria]] = Supreme Court of Victoria.jpg |[[Supreme Court of Western Australia|Court of Appeal of Western Australia]] |[[Supreme Court of Western Australia]] = Western Australian Coat of Arms.svg <!--CANADA--> |[[Supreme Court of Canada]] = Supreme Court of Canada 2.jpg |[[Federal Court of Appeal (Canada)|Federal Court of Appeal of Canada]] |[[Federal Court (Canada)|Federal Court of Canada]] = <!-- None --> |[[Alberta Court of Appeal]] = Shield of Alberta.svg |[[British Columbia Court of Appeal]] = Coat of Arms of British Columbia.png |[[Manitoba Court of Appeal]] = <!-- None --> |[[Court of Appeal of New Brunswick]] |[[Court of Appeal of New Brunswick|New Brunswick Court of Appeal]] |[[New Brunswick Court of Appeal]] = Arms of New Brunswick.svg |[[Court of Appeal of Newfoundland]] |[[Newfoundland Court of Appeal]] |[[Supreme Court of Newfoundland (Court of Appeal)|Court of Appeal of Newfoundland]] |[[Supreme Court of Newfoundland (Court of Appeal)|Newfoundland Court of Appeal]] = Arms of Newfoundland and Labrador.svg |[[Court of Appeal for the Northwest Territories]] = Coat of arms of Northwest Territories.svg |[[Nova Scotia Court of Appeal]] = Coat of arms of Nova Scotia.svg |[[Nunavut Court of Justice]] = Coat of arms of Nunavut.svg |[[Court of Appeal for Ontario]] |[[Ontario Court of Appeal]] = Osgoode Hall May 2012.jpg |[[Supreme Court of Prince Edward Island|Supreme Court of Prince Edward Island (Appeal Division)]] = Flag of Prince Edward Island.svg |[[Quebec Court of Appeal]] = Coat of arms of Quebec.svg |[[Court of Appeal for Saskatchewan]] |[[Saskatchewan Court of Appeal]] = Regina Courthouse.jpg |[[Court of Appeal of the Yukon Territory]] |[[Yukon Territory Court of Appeal]] = Coat of arms of Yukon.svg <!--INDIA--> |[[Supreme Court of India]] = Emblem of the Supreme Court of India.svg |[[Allahabad High Court]] |[[Andhra Pradesh High Court]] |[[Bombay High Court]] |[[Calcutta High Court]] |[[Chhattisgarh High Court]] |[[Delhi High Court]] |[[Guwahati High Court]] |[[Gujarat High Court]] |[[Himachal Pradesh High Court]] |[[Jammu and Kashmir High Court]] |[[Jharkhand High Court]] |[[Karnataka High Court]] |[[Kerala High Court]] |[[Madhya Pradesh High Court]] |[[Madras High Court]] |[[Orissa High Court]] |[[Patna High Court]] |[[Punjab and Haryana High Court]] |[[Rajasthan High Court]] |[[Sikkim High Court]] |[[Uttarakhand High Court]] = Emblem of India.svg <!--INTERNATIONAL COURTS AND TRIBUNALS--> |[[International Court of Justice]] = International Court of Justice Seal.svg <!--IRELAND--> |[[Supreme Court of Ireland]] |[[Court of Criminal Appeal (Ireland)|Court of Criminal Appeal of Ireland]] |[[High Court (Ireland)|High Court of Ireland]] = Coat of arms of Ireland.svg <!--MALAYSIA--> |[[Federal Court of Malaysia]] |[[Court of Appeal of Malaysia]] = Palace of Justice Putrajaya Dec 2006 002.jpg |[[High Courts of Malaysia|High Court in Malaya]] = KualaLumpurCourtsComplex-Malaysia-20080509-cropped.jpg |[[High Courts of Malaysia|High Court in Sabah and Sarawak]] = <!-- None --> <!--NEW ZEALAND--> |[[Supreme Court of New Zealand]] |[[Court of Appeal of New Zealand]] |[[High Court of New Zealand]] = Coat of arms of New Zealand.svg <!--PAKISTAN--> |[[Supreme Court of Pakistan]] = Emblem of the Supreme Court of Pakistan.svg <!--PHILIPPINES--> |[[Supreme Court of the Philippines]] = Seal of the Supreme Court of the Republic of the Philippines.svg <!--SINGAPORE--> |[[Court of Appeal of Singapore]] |[[High Court of Singapore]] = {{#ifexpr:{{gsd|day={{#time:j|{{{date|}}}}}|month={{#time:n|{{{date|}}}}}|year={{#time:Y|{{{date|}}}}} }}<732117|OldSupremeCourtBuilding-Singapore-20070409.jpg|SupremeCourtBuilding-Singapore-20070210.jpg}} <!--SOUTH AFRICA--> |[[Constitutional Court of South Africa]] = Constitutional court of South Africa.jpeg |[[Transvaal Provincial Division]] |[[North Gauteng High Court]] |[[Gauteng Division]] |[[Gauteng Division]] (Pretoria) = Palace of Justice, Church Square, pretoria.JPG |[[Witwatersrand Local Division]] |[[South Gauteng High Court]] |[[Gauteng Division]] (Johannesburg) = Jo'burg High Court.jpg |[[Cape Provincial Division]] |[[Western Cape High Court]] |[[Western Cape Division]] = Western Cape High Court.jpg <!--UNITED KINGDOM--> |[[Supreme Court of the United Kingdom]] = Badge of the Supreme Court of the United Kingdom.svg |[[Judicial Committee of the Privy Council]] |[[Judicial Committee of the Privy Council|Privy Council]] |[[Privy Council]] = Royal Arms of the United Kingdom (Privy Council).svg |[[House of Lords]] |[[Judicial functions of the House of Lords|House of Lords]] |[[Court of Appeal of England and Wales]] |[[High Court of Justice]] |[[High Court of Justice#Queen's Bench Division|High Court of Justice (Queen's Bench Division)]] |[[Divisional Court (England and Wales)|Divisional Court]] |[[King's Bench]] |[[King's Bench Division]] |[[Queen's Bench]] |[[Queen's Bench Division]] |[[High Court of Justice#Chancery Division|High Court of Justice (Chancery Division)]] |[[Chancery Division]] |[[High Court of Justice#Family Division|High Court of Justice (Family Division)]] |[[Family Division]] |[[Court for Crown Cases Reserved]] |[[Court of Common Pleas (England)|Court of Common Pleas]] |[[Court of Criminal Appeal]] |[[Court of Exchequer Chamber]] = Royal Coat of Arms of the United Kingdom.svg |[[High Court of Justiciary]] = Royal Coat of Arms of the United Kingdom (Scotland).svg <!--USA--> |[[Supreme Court of the United States]] = Seal of the United States Supreme Court.svg |[[United States Court of Appeals for the Federal Circuit]] = US-CourtOfAppeals-FederalCircuit-Seal.svg |[[United States Court of Appeals for the District of Columbia Circuit]] = District of Columbia Court of Appeals Seal.svg |[[United States Court of Appeals for the First Circuit]] = Seal of the United States Court of Appeals for the First Circuit.svg |[[United States Court of Appeals for the Second Circuit]] = United States Court of Appeals For The Second Circuit Seal.svg |[[United States Court of Appeals for the Third Circuit]] = Seal of the United States Court of Appeals for the Third Circuit.svg |[[United States Court of Appeals for the Fourth Circuit]] = Seal of the United States Court of Appeals for the Fourth Circuit.svg |[[United States Court of Appeals for the Fifth Circuit]] = Seal of the United States Court of Appeals for the Fifth Circuit.svg |[[United States Court of Appeals for the Sixth Circuit]] = US-CourtOfAppeals-6thCircuit-Seal.png |[[United States Court of Appeals for the Seventh Circuit]] = Seal of the United States Court of Appeals for the Seventh Circuit.svg |[[United States Court of Appeals for the Eighth Circuit]] = US-CourtOfAppeals-8thCircuit-Seal.png |[[United States Court of Appeals for the Ninth Circuit]] = Seal of the United States Court of Appeals, 9th Circuit.svg |[[United States Court of Appeals for the Tenth Circuit]] = US-CourtOfAppeals-10thCircuit-Seal.png |[[United States Court of Appeals for the Eleventh Circuit]] = US-CourtOfAppeals-11thCircuit-Seal.png |[[United States Court of Appeals for Veterans Claims]] = Seal of the United States Court of Appeals for Veterans Claims.svg |[[United States Court of Federal Claims]] = Seal of the United States Court of Federal Claims.svg |[[Supreme Court of California]] = Seal of the Supreme Court of California.png |[[California Courts of Appeal]] = Supremecourtofcaliforniamaincourthouse.jpg |[[Massachusetts Supreme Judicial Court]] = Seal of Massachusetts.svg |[[New York Court of Appeals]] = Seal of the New York Court of Appeals.svg |[[Supreme Court of Texas]] = Seal of the Supreme Court of Texas.png |[[Supreme Court of Virginia]] = Seal of Virginia.svg <!--U.S. District Courts--> |[[United States District Court for the Northern District of Alabama]] = NDAla seal.gif |[[United States District Court for the Middle District of Alabama]] = Seal_of_the_United_States_District_Court_for_the_Middle_District_of_Alabama.gif |[[United States District Court for the Southern District of Alabama]] = Alabama-southern.gif |[[United States District Court for the District of Alaska]] = District-Alaska.gif |[[United States District Court for the District of Arizona]] = District of Arizona District Court.png |[[United States District Court for the Eastern District of Arkansas]] = Arkansas-eastern.gif |[[United States District Court for the Western District of Arkansas]] = <!-- None --> |[[United States District Court for the Central District of California]] = <!-- None --> |[[United States District Court for the Eastern District of California]] = California-eastern.gif |[[United States District Court for the Northern District of California]] = US DC NorCal.svg |[[United States District Court for the Southern District of California]] = Seal of the United States District Court for the Southern District of California.png |[[United States District Court for the District of Colorado]] = <!-- None --> |[[United States District Court for the District of Connecticut]] = <!-- None --> |[[United States District Court for the District of Delaware]] = Delaware District Court.gif |[[United States District Court for the District of Columbia]] = Seal of the U.S. District Court for the District of Columbia.png |[[United States District Court for the Northern District of Florida]] = <!-- None --> |[[United States District Court for the Middle District of Florida]] = <!-- None --> |[[United States District Court for the Southern District of Florida]] = <!-- None --> |[[United States District Court for the Northern District of Georgia]] = <!-- None --> |[[United States District Court for the Middle District of Georgia]] = <!-- None --> |[[United States District Court for the Southern District of Georgia]] = <!-- None --> |[[United States District Court for the District of Guam]] = <!-- None --> |[[United States District Court for the District of Hawaii]] = <!-- None --> |[[United States District Court for the District of Idaho]] = District-Idaho.gif |[[United States District Court for the Northern District of Illinois]] = N.D. Ill. seal.gif |[[United States District Court for the Central District of Illinois]] = <!-- None --> |[[United States District Court for the Southern District of Illinois]] = <!-- None --> |[[United States District Court for the Northern District of Indiana]] = <!-- None --> |[[United States District Court for the Southern District of Indiana]] = <!-- None --> |[[United States District Court for the Northern District of Iowa]] = <!-- None --> |[[United States District Court for the Southern District of Iowa]] = <!-- None --> |[[United States District Court for the District of Kansas]] = <!-- None --> |[[United States District Court for the Eastern District of Kentucky]] = EDKY seal.gif |[[United States District Court for the Western District of Kentucky]] = <!-- None --> |[[United States District Court for the Eastern District of Louisiana]] = Louisiana-eastern.gif |[[United States District Court for the Middle District of Louisiana]] = Louisiana-middle.gif |[[United States District Court for the Western District of Louisiana]] = Louisiana-western.gif |[[United States District Court for the District of Maine]] = <!-- None --> |[[United States District Court for the District of Maryland]] = <!-- None --> |[[United States District Court for the District of Massachusetts]] = District-Massachusetts.gif |[[United States District Court for the Eastern District of Michigan]] = <!-- None --> |[[United States District Court for the Western District of Michigan]] = <!-- None --> |[[United States District Court for the District of Minnesota]] = <!-- None --> |[[United States District Court for the Northern District of Mississippi]] = <!-- None --> |[[United States District Court for the Southern District of Mississippi]] = <!-- None --> |[[United States District Court for the Eastern District of Missouri]] = <!-- None --> |[[United States District Court for the Western District of Missouri]] = <!-- None --> |[[United States District Court for the District of Montana]] = <!-- None --> |[[United States District Court for the District of Nebraska]] = <!-- None --> |[[United States District Court for the District of Nevada]] = <!-- None --> |[[United States District Court for the District of New Hampshire]] = USDCNHseal.gif |[[United States District Court for the District of New Jersey]] = <!-- None --> |[[United States District Court for the District of New Mexico]] = <!-- None --> |[[United States District Court for the Eastern District of New York]] = NewYork-eastern.gif |[[United States District Court for the Northern District of New York]] = NewYork-northern.gif |[[United States District Court for the Southern District of New York]] = NewYork-southern.gif |[[United States District Court for the Western District of New York]] = <!-- None --> |[[United States District Court for the Eastern District of North Carolina]] = <!-- None --> |[[United States District Court for the Middle District of North Carolina]] = NorthCarolina-middle.gif |[[United States District Court for the Western District of North Carolina]] = NorthCarolina-western.gif |[[United States District Court for the District of North Dakota]] = <!-- None --> |[[United States District Court for the Northern Mariana Islands]] = District-NorthernMarianaIslands.gif |[[United States District Court for the Northern District of Ohio]] = Ohio-northern.gif |[[United States District Court for the Southern District of Ohio]] = Ohio-southern.gif |[[United States District Court for the Eastern District of Oklahoma]] = <!-- None --> |[[United States District Court for the Northern District of Oklahoma]] = Oklahoma-northern.gif |[[United States District Court for the Western District of Oklahoma]] = Oklahoma-western.gif |[[United States District Court for the District of Oregon]] = District-Oregon.gif |[[United States District Court for the Eastern District of Pennsylvania]] = Pennsylvania-eastern.gif |[[United States District Court for the Middle District of Pennsylvania]] = Pennsylvania-middle.gif |[[United States District Court for the Western District of Pennsylvania]] = Pennsylvania-western.gif |[[United States District Court for the District of Puerto Rico]] = District-PuertoRico.gif |[[United States District Court for the District of Rhode Island]] = Seal of the U.S. District Court for the District of Rhode Island.jpg |[[United States District Court for the District of South Carolina]] = District-SouthCarolinaA.gif |[[United States District Court for the District of South Dakota]] = District-SouthDakota.gif |[[United States District Court for the Eastern District of Tennessee]] = Tennessee-eastern.gif |[[United States District Court for the Middle District of Tennessee]] = Tennessee-middle.gif |[[United States District Court for the Western District of Tennessee]] = Tennessee-western.gif |[[United States District Court for the Eastern District of Texas]] = Texas-eastern.gif |[[United States District Court for the Northern District of Texas]] = Texas-northern.gif |[[United States District Court for the Southern District of Texas]] = Texas-southern.gif |[[United States District Court for the Western District of Texas]] = Texas-western.gif |[[United States District Court for the District of Utah]] = District-Utah.gif |[[United States District Court for the District of Vermont]] = District-Vermont.gif |[[District Court of the Virgin Islands]] = District-VirginIslands.gif |[[United States District Court for the Eastern District of Virginia]] = Virginia-eastern.gif |[[United States District Court for the Western District of Virginia]] = Virginia-western.gif |[[United States District Court for the Eastern District of Washington]] = Washington-eastern.gif |[[United States District Court for the Western District of Washington]] = Washington-western.gif |[[United States District Court for the Northern District of West Virginia]] = WestVirginia-northern.gif |[[United States District Court for the Southern District of West Virginia]] = WestVirginia-southern.gif |[[United States District Court for the Eastern District of Wisconsin]] = Wisconsin-eastern.png |[[United States District Court for the Western District of Wisconsin]] = <!-- None --> |[[United States District Court for the District of Wyoming]] = District-Wyoming.gif <!--DEFAULT--> |#default = <!-- None --> }}</includeonly><noinclude>{{Documentation}}</noinclude> 7d1f296c3d571cb548bcac4c2b0c329bd665cfb6 Template:Infobox court case/doc 10 213 592 2023-01-19T14:55:07Z en>Paine Ellsworth 0 High-use template + fmt wikitext text/x-wiki {{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{High-use}} {{Auto italic title}} {{Update|documentation}} {{Lua|Module:Infobox|Module:InfoboxImage|Module:Check for unknown parameters}} ==Usage== This template summarizes information about a specific court case. {{Infobox court case |name = |court = |image = |imagesize = |imagelink = |imagealt = |caption = |full name = |date decided = |citations = |ECLI = |transcripts = |judges = |number of judges = |decision by = |concurring = |dissenting = |concur/dissent = |prior actions = |appealed from = |appealed to = |subsequent actions = |related actions = |opinions = |keywords = <!-- {{Hlist|...}} --> |italic title = }} <pre> {{Infobox court case |name = |court = |image = |imagesize = |imagelink = |imagealt = |caption = |full name = |date decided = |citations = |ECLI = |transcripts = |judges = |number of judges = |decision by = |concurring = |dissenting = |concur/dissent = |prior actions = |appealed from = |appealed to = |subsequent actions = |related actions = |opinions = |keywords = <!-- {{Hlist|...}} --> |italic title = }} </pre> ==Parameters== This infobox takes a number of parameters, which are optional unless indicated otherwise: ;name :The short name of the case, which should preferably be the same as the article title. If the parameter is omitted, the article name is used. ;court :The name of the court that the case was heard in. <nowiki>[[Wikilink]]</nowiki> the name to a Wikipedia article about the court, if there is one. To cause the template to automatically display an image of the [[coat of arms]] of a court or of the court building, enter the name of the court as shown at {{tl|Infobox court case/images}}. ;image :An image to represent the court, such as a coat of arms or a photograph of a courthouse. Type the name of the image without the "{{mono|File:}}" prefix and do not [[Help:Link|wikilink]] it. If you omit this parameter, the template automatically displays an image according to the scheme at {{tl|Infobox court case/images}}. :Note that only images that have been released under a [[free content|free licence]] should be used here. Such images should preferably be uploaded to the [[:commons:Main Page|Wikimedia Commons]]. ''Do not'' use images under a (supposed) "[[Wikipedia:Non-free content|fair use]]" justification, as the use of such images in infoboxes probably does not constitute fair use. ;imagesize :The width of the image in [[pixel]]s, particularly if it is less than 180 [[pixel]]s (px). Type the number without the "px" suffix ("{{mono|150}}", not "{{mono|150px}}"). If this parameter is omitted or called but left blank, the image size defaults to 180px. ;imagelink :Page to [[WP:PIC#link|link]] to from the image. If this is specified, {{para|imagealt}} should also be specified. ;imagealt :Alt text for the image; see ''[[Wikipedia:Alternative text for images]]''. ;caption :A caption for the image. Terms in the caption can be wikilinked, if desired. ;full name :The full name of the case, including terms like "& Anor" ("and another") or "& Ors" ("and others"). Set out here any abbreviations that appear in the short name of the case in full. ;start date :The date the trial started. Use {{tlx|start date|yyyy|mm|dd}}. ;date decided :The date the decision was handed down. Use {{tlx|start date|yyyy|mm|dd}}. In line with "[[Wikipedia:Manual of Style (dates and numbers)#Linking and autoformatting of dates]]", do not add wikilinks to dates. ;citations :Citations of [[law report|reports]] of the case. If a report is available online, use a [[:Category:Law citation templates|citation template]] (such as {{tl|Cite BAILII}}) where available to generate an external link automatically, or else create a link manually. :Note that if the citation uses square brackets, replace them with {{mono|&amp;#91;}} and {{mono|&amp;#93;}} when putting them inside an external link. ;ECLI : The [[European Case Law Identifier]], eg. <code>ECLI:NL:RBAMS:1998:AD2957</code>, gives {{ECLI|ECLI:NL:RBAMS:1998:AD2957}} ;transcripts :External links to transcripts of the case, where available. ;judges :List the names of the judges sitting on the case, in the order of their precedence if known, separated by commas. The Chief Justice or President of the court, if they are hearing the case, should appear first. The order that the judges' names should appear in is usually shown in reports of the case. Where available, link a name to a Wikipedia article about the judge. ;number of judges :Write the number of judges in numerals. This parameter only controls whether the "judges" header is plural. If blank, it defaults to "judge(s)". ;decision by :Name the judge who wrote the decision if more than one judge sat on the case. Do not link a name again if it was already linked in the {{para|judges}} parameter. ;concurring :List those judges who wrote concurring opinions, if any. Do not link a name again if it was already linked in the {{para|judges}} parameter. ;dissenting :List those judges who wrote dissenting opinions, if any. Do not link a name again if it was already linked in the {{para|judges}} parameter. ;concur/dissent :List those judges, if any, who wrote opinions concurring in part and dissenting in part. Do not link a name again if it was already linked in the {{para|judges}} parameter. ;prior actions :Mention any prior trials or appeals, if any. Where possible, link the name of a prior case to a Wikipedia article about the case, and link citations as described above. ;appealed from :If this case is an appeal, name the court from which the appeal immediately came. Link the name if possible. If the case at the lower court has its own article, that case can be linked in parentheses after the name of the court. More complicated or longer histories can use the prior actions field alongside this field or instead of it. ;appealed to :If this case was appealed, name the court to which the appeal immediately went. Link the name if possible. If the case at the higher court has its own article, that case can be linked in parentheses after the name of the court. More complicated or longer histories can use the subsequent actions field alongside this field or instead of it. ;subsequent actions :Mention any later appeals, retrials, or prison sentences, if any. Where possible, link the name of a subsequent case to a Wikipedia article about the case, and link citations as described above. ;related actions :Mention any related actions, for example, ''[[Mabo v Queensland (No 2)]]'' if the article is about ''[[Mabo v Queensland (1988)|Mabo v Queensland (No 1)]]''. Where possible, link the name of a related case to a Wikipedia article about the case, and link citations as described above. ;opinions :A very brief summary of the major findings or holdings in the case. Many case reports will have headnotes or summaries of the holdings that can be modified and entered into this field. ;keywords :A list of [[index term|keywords]] that describe the legal issues dealt with by the case. List keywords alphabetically, separate them with {{tl|flatlist}} or {{tl|hlist}}, and link them to appropriate Wikipedia articles wherever possible; for example: <code><nowiki>{{hlist| [[Bailment]] | [[common carrier]] | [[negligence]] | [[strict liability]] }}</nowiki></code> :which will render as: {{hlist| [[Bailment]] | [[common carrier]] | [[negligence]] | [[strict liability]] }} ;italic title :Indicates that the page title should be italicized. Valid values are "yes", "no" or "force": :*{{para|italic title|yes}} – the title is italicised, but only if it is less than 50 characters in length; if it contains an opening parenthesis <code>(</code>, only the portion before the opening parenthesis will be italicised :*{{para|italic title|no}} – the title is not italicised :*{{para|italic title|force}} – the title is fully italicised :If the {{para|italic title}} parameter is blank or omitted, the action is identical to {{para|italic title|yes}} ; ECLI: The [[European Case Law Identifier]]. Available for EU courts, European Patent office (Board of Appeal), and several EU countries. Converted into a link to the judgement for Dutch, German and EU cases. ==Legacy parameters== Full blank syntax, including the legacy parameters included for compatibility with infoboxes based on [[Template:Infobox SCOTUS case]]. Those include: [[Template:Infobox California Supreme Court case]], [[Template:Infobox South Carolina Supreme Court case]]. {{hidden begin}} <pre> {{Infobox court case <!-- main parameters --> | name = {{{name|{{{Litigants|{{PAGENAME}} }}} }}} | court = {{{CourtName|{{{Court|{{{court}}} }}} }}} | image = {{{image|}}} | imagesize = {{{imagesize|}}} | imagelink = {{{imagelink|}}} | imagealt = {{{imagealt|}}} | caption = {{{caption|}}} | full name = {{{FullName|{{{full name|}}} }}} | start_date = {{{start_date|}}} | date_decided = {{{DecideDate|{{{date_decided|{{{date decided|}}} }}} }}} {{{DecideYear|}}} | citations = {{{Citation|{{{citations|{{{Citations|{{{CitationNew|}}} }}} }}} }}} | transcripts = {{{transcripts|}}} | judges = {{{judges|{{{Judges|{{{Membership|}}} }}} }}} | decision by = {{{decision by|}}} | concurring = {{{concurring|{{{Concurrence|}}} }}} | dissenting = {{{dissenting|{{{Dissent|}}} }}} | concur/dissent = {{{Concur/dissent|{{{Concurrence/Dissent|{{{concur/dissent|}}} }}} }}} | prior_actions = {{{prior_actions|{{{prior actions|{{{Prior|}}} }}} }}} | appealed from = {{{appealed from|}}} | appealed to = {{{appealed to|}}} | subsequent_actions = {{{subsequent_actions|{{{subsequent actions|{{{Subsequent|}}} }}} }}} | related actions = {{{related actions|{{{Related|}}} }}} | holding = {{{Outcome|{{{QuestionsPresented|{{{Holding|{{{holding|{{{Ruling|{{{opinions|}}} }}} }}} }}} }}} }}} | laws_applied = {{{LawsApplied|{{{laws_applied|}}} }}} | keywords = {{{Keywords|{{{keywords|}}} }}} | italic title = {{{italic title|}}} <!-- legacy parameters from Infobox SCOTUS case --> | CourtSeal = {{{CourtSeal|}}} | ArgueDate = {{{ArgueDate|}}} | ArgueDateA = {{{ArgueDateA|}}} | ArgueDateB = {{{ArgueDateB|}}} | ArgueDateC = {{{ArgueDateC|}}} | ArgueYear = {{{ArgueYear|}}} | ReargueDate = {{{ReargueDate|}}} | ReargueDateA = {{{ReargueDateA|}}} | ReargueDateB = {{{ReargueDateB|}}} | ReargueYear = {{{ReargueYear|}}} | ReargueDate2 = {{{ReargueDate2|}}} | ReargueDateA2 = {{{ReargueDateA2|}}} | ReargueDateB2 = {{{ReargueDateB2|}}} | ReargueYear2 = {{{ReargueYear2|}}} | SubmitDate = {{{SubmitDate|}}} | SubmitYear = {{{SubmitYear|}}} | Neutral Citation = {{{Neutral Citation|}}} | Other Citations = {{{Other Citations|}}} | Claim = {{{Claim|}}} | Cases_cited = {{{Cases_cited|}}} | Legislation_cited = {{{Legislation_cited|}}} | Procedural = {{{Procedural|}}} | OralArgument = {{{OralArgument|}}} | OralArguments = {{{OralArguments|}}} | OralReargument = {{{OralReargument|}}} | OpinionAnnouncement = {{{OpinionAnnouncement|}}} | ChiefJudge = {{{ChiefJudge|}}} | AssociateJudges = {{{AssociateJudges|}}} | PerCuriam = {{{PerCuriam|}}} | Majority = {{{Majority|}}} | JoinMajority = {{{JoinMajority|}}} | Majority2 = {{{Majority2|}}} | JoinMajority2 = {{{JoinMajority2|}}} | Majority3 = {{{Majority3|}}} | JoinMajority3 = {{{JoinMajority3|}}} | Plurality = {{{Plurality|}}} | JoinPlurality = {{{JoinPlurality|}}} | Plurality2 = {{{Plurality2|}}} | JoinPlurality2 = {{{JoinPlurality2|}}} | Plurality3 = {{{Plurality3|}}} | JoinPlurality3 = {{{JoinPlurality3|}}} | Plurality4 = {{{Plurality4|}}} | JoinPlurality4 = {{{JoinPlurality4|}}} | Seriatim = {{{Seriatim|}}} | Seriatim2 = {{{Seriatim2|}}} | Seriatim3 = {{{Seriatim3|}}} | Seriatim4 = {{{Seriatim4|}}} | Seriatim5 = {{{Seriatim5|}}} | JoinConcurrence = {{{JoinConcurrence|}}} | Concurrence2 = {{{Concurrence2|}}} | JoinConcurrence2 = {{{JoinConcurrence2|}}} | Concurrence3 = {{{Concurrence3|}}} | JoinConcurrence3 = {{{JoinConcurrence3|}}} | Concurrence4 = {{{Concurrence4|}}} | JoinConcurrence4 = {{{JoinConcurrence4|}}} | Concurrence5 = {{{Concurrence5|}}} | JoinConcurrence5 = {{{JoinConcurrence5|}}} | Concurrence6 = {{{Concurrence6|}}} | JoinConcurrence6 = {{{JoinConcurrence6|}}} | Concurrence7 = {{{Concurrence7|}}} | JoinConcurrence7 = {{{JoinConcurrence7|}}} | Concurrence8 = {{{Concurrence8|}}} | JoinConcurrence8 = {{{JoinConcurrence8|}}} | JoinConcurrence/Dissent = {{{JoinConcurrence/Dissent|}}} | Concurrence/Dissent2 = {{{Concurrence/Dissent2|}}} | JoinConcurrence/Dissent2 = {{{JoinConcurrence/Dissent2|}}} | Concurrence/Dissent3 = {{{Concurrence/Dissent3|}}} | JoinConcurrence/Dissent3 = {{{JoinConcurrence/Dissent3|}}} | Concurrence/Dissent4 = {{{Concurrence/Dissent4|}}} | JoinConcurrence/Dissent4 = {{{JoinConcurrence/Dissent4|}}} | Concurrence/Dissent5 = {{{Concurrence/Dissent5|}}} | JoinConcurrence/Dissent5 = {{{JoinConcurrence/Dissent5|}}} | Concurrence/Dissent6 = {{{Concurrence/Dissent6|}}} | JoinConcurrence/Dissent6 = {{{JoinConcurrence/Dissent6|}}} | Concurrence/Dissent7 = {{{Concurrence/Dissent7|}}} | JoinConcurrence/Dissent7 = {{{JoinConcurrence/Dissent7|}}} | Concurrence/Dissent8 = {{{Concurrence/Dissent8|}}} | JoinConcurrence/Dissent8 = {{{JoinConcurrence/Dissent8|}}} | JoinDissent = {{{JoinDissent|}}} | ConcurrenceDissent = {{{ConcurrenceDissent|}}} | Dissent2 = {{{Dissent2|}}} | JoinDissent2 = {{{JoinDissent2|}}} | ConcurrenceDissent2 = {{{ConcurrenceDissent2|}}} | Dissent3 = {{{Dissent3|}}} | JoinDissent3 = {{{JoinDissent3|}}} | ConcurrenceDissent3 = {{{ConcurrenceDissent3|}}} | Dissent4 = {{{Dissent4|}}} | JoinDissent4 = {{{JoinDissent4|}}} | ConcurrenceDissent4 = {{{ConcurrenceDissent4|}}} | Dissent5 = {{{Dissent5|}}} | JoinDissent5 = {{{JoinDissent5|}}} | ConcurrenceDissent5 = {{{ConcurrenceDissent5|}}} | NotParticipating = {{{NotParticipating|}}} | Superseded = {{{Superseded|}}} | Overruled = {{{Overruled|}}} | Overturned previous case = {{{Overturned previous case|}}} | Abrogated = {{{Abrogated|}}} }} </pre> {{hidden end}} ==Technical information== {{notice|This section contains technical information to assist editors familiar with templates and [[:mw:Help:Extension:ParserFunctions|parser functions]] to edit this template.}} The {{para|image}} parameter in the template contains the following function: <pre style="overflow: auto"> {{#invoke:InfoboxImage|InfoboxImage|image= {{#if:{{{image<includeonly>|</includeonly>}}} |{{{image}}} |{{Infobox court case/images|courtimage={{{court}}}|date={{{date decided|}}} }} }}|size={{{imagesize|}}}|sizedefault=frameless|upright=0.82|link={{{imagelink|}}}|alt={{{imagealt|}}} }} </pre> The function does the following tasks: * If the parameter {{para|image}} is used in the template, that image is displayed. If a value is specified for {{para|imagesize}}, the image is given that width; otherwise the image width defaults to 180 px. * If {{para|image}} is not used, a check is done to see if the value of {{para|court}} is listed in {{tl|Infobox court case/images}}. If the result is "None", then no image is displayed. If the result is an image file (either the coat of arms of a court or a photograph of a courthouse), then the image file is displayed. {{tl|Infobox court case/images}} can be tweaked to display different images depending on the date when the case was decided – for help with this, leave a message on the [[Template talk:Infobox court case|talk page]]. * Again, if a value is specified for {{para|imagesize}}, the image is given that width; otherwise the image width defaults to upright=0.82 (which is 180px). * In either case the image is given a link and alt text specified by {{para|imagelink}} and {{para|imagealt}}. If {{para|imagelink}} is omitted or given no value, the image is linked to its image description page. [[User:Jacklee|JackLee]] came up with the first version of this function, but thanks are due to [[User:Thumperward|Chris Cunningham]] for coming up with a cleaner solution that works better. == TemplateData == {{TemplateData header}} <templatedata> { "description": "insert description here", "params": { "name": { "label": "name", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "The short name of the case, which should preferably be the same as the article title. If the parameter is omitted, the article name is used." }, "Litigants": { "label": "Litigants", "type": "string", "required": false, "suggested": false, "deprecated": true }, "image": { "label": "image", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "An image to represent the court, such as a coat of arms or a photograph of a courthouse. Type the name of the image without the File: prefix and do not wikilink it. If you omit this parameter, the template may automatically displays an image based on the name of the court." }, "court": { "label": "Court", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "The name of the court that the case was heard in. Link the name to a Wikipedia article about the court, if there is one", "aliases": [ "CourtName" ] }, "start date": { "label": "start date", "type": "string", "required": false, "suggested": false, "deprecated": false }, "date decided": { "label": "date decided", "type": "string", "required": false, "suggested": false, "deprecated": false }, "CourtSeal": { "label": "CourtSeal", "type": "string", "required": false, "suggested": false, "deprecated": false }, "imagesize": { "label": "imagesize", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "The width of the image in pixels, particularly if it is less than 180 pixels (px). Type the number without the \"px\" suffix (\"150\", not \"150px\"). If this parameter is omitted or called but left blank, the image size defaults to 180px." }, "imagelink": { "label": "imagelink", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "Page to link to from the image. If this is specified, `imagealt`-parameter should also be specified." }, "imagealt": { "label": "imagealt", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "Alt text for the image; see Wikipedia:Alternative text for images." }, "caption": { "label": "caption", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "A caption for the image. Terms in the caption can be wikilinked, if desired." }, "full name": { "label": "FullName", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "The full name of the case, including terms like \"& Anor\" (\"and another\") or \"& Ors\" (\"and others\"). Set out here any abbreviations that appear in the short name of the case in full." }, "ArgueDate": { "label": "ArgueDate", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ArgueDateB": { "label": "ArgueDateB", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ArgueDateC": { "label": "ArgueDateC", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ArgueYear": { "label": "ArgueYear", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ArgueDateA": { "label": "ArgueDateA", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ReargueDate": { "label": "ReargueDate", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ReargueYear": { "label": "ReargueYear", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ReargueDateA": { "label": "ReargueDateA", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ReargueDateB": { "label": "ReargueDateB", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ReargueDate2": { "label": "ReargueDate2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ReargueYear2": { "label": "ReargueYear2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ReargueDateA2": { "label": "ReargueDateA2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ReargueDateB2": { "label": "ReargueDateB2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "SubmitDate": { "label": "SubmitDate", "type": "string", "required": false, "suggested": false, "deprecated": true }, "SubmitYear": { "label": "SubmitYear", "type": "string", "required": false, "suggested": false, "deprecated": true }, "DecideDate": { "label": "Date decided", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "The date the decision was handed down. Use {{start date|yyyy|mm|dd}}. In line with \"Wikipedia:Manual of Style (dates and numbers)#Linking and autoformatting of dates\", do not add wikilinks to dates.", "aliases": [ "date_decided" ] }, "DecideYear": { "label": "Year Decided", "type": "string", "required": false, "suggested": false, "deprecated": true }, "citations": { "label": "Citations", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "Citations of reports of the case. If a report is available online, use a citation template (such as {{Cite BAILII}}) where available to generate an external link automatically, or else create a link manually. Note that if the citation uses square brackets, replace them with &#91; and &#93; when putting them inside an external link.", "aliases": [ "Citation", "Citations", "CitationNew", "Neutral Citation", "Other Citations" ] }, "ECLI": { "label": "ECLI", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "The European Case Law Identifier. Available for a selection of European court cases, notably Dutch, Finnish, Spanish and EU." }, "transcripts": { "label": "Transcripts", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "External links to transcripts of the case, where available." }, "Cases_cited": { "label": "Cases_cited", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Legislation_cited": { "label": "Legislation_cited", "type": "string", "required": false, "suggested": false, "deprecated": true }, "prior_actions": { "label": "prior actions", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "Mention any prior trials or appeals, if any. Where possible, link the name of a prior case to a Wikipedia article about the case, and link citations as described above", "aliases": [ "Prior" ] }, "appealed from": { "label": "appealed from", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "If this case is an appeal, name the court from which the appeal immediately came. Link the name if possible. If the case at the lower court has its own article, that case can be linked in parentheses after the name of the court. More complicated or longer histories can use the prior actions field alongside this field or instead of it." }, "appealed to": { "label": "appealed to", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "If this case was appealed, name the court to which the appeal immediately went. Link the name if possible. If the case at the higher court has its own article, that case can be linked in parentheses after the name of the court. More complicated or longer histories can use the subsequent actions field alongside this field or instead of it." }, "subsequent_actions": { "label": "subsequent actions", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "Mention any later appeals or retrials, if any. Where possible, link the name of a subsequent case to a Wikipedia article about the case, and link citations as described above.", "aliases": [ "Subsequent" ] }, "Procedural": { "label": "Procedural", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Related": { "label": "related actions", "type": "string", "required": false, "suggested": false, "deprecated": true, "description": "Mention any related actions, for example, Mabo v Queensland (No 2) if the article is about Mabo v Queensland (No 1). Where possible, link the name of a related case to a Wikipedia article about the case, and link citations as described above." }, "OralArgument": { "label": "OralArgument", "type": "string", "required": false, "suggested": false, "deprecated": true }, "OralArguments": { "label": "OralArguments", "type": "string", "required": false, "suggested": false, "deprecated": true }, "OralReargument": { "label": "OralReargument", "type": "string", "required": false, "suggested": false, "deprecated": true }, "OpinionAnnouncement": { "label": "OpinionAnnouncement", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Outcome": { "label": "Outcome", "type": "string", "required": false, "suggested": false, "deprecated": true }, "QuestionsPresented": { "label": "QuestionsPresented", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Holding": { "label": "Holding", "type": "string", "required": false, "suggested": false, "deprecated": true, "aliases": [ "holding" ] }, "Ruling": { "label": "Ruling", "type": "string", "required": false, "suggested": false, "deprecated": true }, "opinions": { "label": "opinions", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "A very brief summary of the major findings or holdings in the case. Many case reports will have headnotes or summaries of the holdings that can be modified and entered into this field." }, "Judges": { "label": "judges", "type": "string", "required": false, "suggested": false, "deprecated": true, "description": "List the names of the judges sitting on the case, in the order of their precedence if known, separated by commas. The Chief Justice or President of the court, if they are hearing the case, should appear first. The order that the judges' names should appear in is usually shown in reports of the case. Where available, link a name to a Wikipedia article about the judge." }, "Membership": { "label": "Membership", "type": "string", "required": false, "suggested": false, "deprecated": true }, "judge": { "label": "judge", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ChiefJudge": { "label": "ChiefJudge", "type": "string", "required": false, "suggested": false, "deprecated": true }, "AssociateJudges": { "label": "AssociateJudges", "type": "string", "required": false, "suggested": false, "deprecated": true }, "number of judges": { "label": "number of judges", "type": "string", "required": false, "suggested": false, "deprecated": true, "description": "Write the number of judges in numerals. This parameter only controls whether the \"judges\" header is plural. If blank, it defaults to \"judge(s)\"." }, "decision by": { "label": "decision by", "type": "string", "required": false, "suggested": false, "deprecated": true, "description": "Name the judge who wrote the decision if more than one judge sat on the case. Do not link a name again if it was already linked in the `judges`-parameter" }, "Majority": { "label": "Majority", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Plurality": { "label": "Plurality", "type": "string", "required": false, "suggested": false, "deprecated": true }, "PerCuriam": { "label": "PerCuriam", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Dissent": { "label": "Dissent", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence": { "label": "Concurrence", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinMajority": { "label": "JoinMajority", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Majority2": { "label": "Majority2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinMajority2": { "label": "JoinMajority2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Majority3": { "label": "Majority3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinMajority3": { "label": "JoinMajority3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinPlurality": { "label": "JoinPlurality", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Plurality2": { "label": "Plurality2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinPlurality2": { "label": "JoinPlurality2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Plurality3": { "label": "Plurality3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinPlurality3": { "label": "JoinPlurality3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Plurality4": { "label": "Plurality4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinPlurality4": { "label": "JoinPlurality4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Seriatim": { "label": "Seriatim", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Seriatim2": { "label": "Seriatim2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Seriatim3": { "label": "Seriatim3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Seriatim4": { "label": "Seriatim4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Seriatim5": { "label": "Seriatim5", "type": "string", "required": false, "suggested": false, "deprecated": true }, "concurring": { "label": "concurring", "type": "string", "required": false, "suggested": false, "deprecated": true, "description": " List those judges who wrote concurring opinions, if any. Do not link a name again if it was already linked in the `judges`-parameter" }, "JoinConcurrence": { "label": "JoinConcurrence", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence2": { "label": "Concurrence2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence2": { "label": "JoinConcurrence2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence3": { "label": "Concurrence3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence3": { "label": "JoinConcurrence3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence4": { "label": "Concurrence4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence4": { "label": "JoinConcurrence4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence5": { "label": "Concurrence5", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence5": { "label": "JoinConcurrence5", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence6": { "label": "Concurrence6", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence6": { "label": "JoinConcurrence6", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence7": { "label": "Concurrence7", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence7": { "label": "JoinConcurrence7", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence8": { "label": "Concurrence8", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence8": { "label": "JoinConcurrence8", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence/Dissent": { "label": "Concurrence/Dissent", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concur/dissent": { "label": "concur/dissent", "type": "string", "required": false, "suggested": false, "deprecated": true, "description": "List those judges, if any, who wrote opinions concurring in part and dissenting in part. Do not link a name again if it was already linked in the `judges`-parameter.", "aliases": [ "concur/dissent" ] }, "JoinConcurrence/Dissent": { "label": "JoinConcurrence/Dissent", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence/Dissent2": { "label": "Concurrence/Dissent2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence/Dissent2": { "label": "JoinConcurrence/Dissent2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence/Dissent3": { "label": "Concurrence/Dissent3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence/Dissent3": { "label": "JoinConcurrence/Dissent3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence/Dissent4": { "label": "Concurrence/Dissent4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence/Dissent4": { "label": "JoinConcurrence/Dissent4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence/Dissent5": { "label": "Concurrence/Dissent5", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence/Dissent5": { "label": "JoinConcurrence/Dissent5", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence/Dissent6": { "label": "Concurrence/Dissent6", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence/Dissent6": { "label": "JoinConcurrence/Dissent6", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence/Dissent7": { "label": "Concurrence/Dissent7", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence/Dissent7": { "label": "JoinConcurrence/Dissent7", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence/Dissent8": { "label": "Concurrence/Dissent8", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence/Dissent8": { "label": "JoinConcurrence/Dissent8", "type": "string", "required": false, "suggested": false, "deprecated": true }, "dissenting": { "label": "dissenting", "type": "string", "required": false, "suggested": false, "deprecated": true, "description": "List those judges who wrote dissenting opinions, if any. Do not link a name again if it was already linked in the `judges`-parameter" }, "JoinDissent": { "label": "JoinDissent", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ConcurrenceDissent": { "label": "ConcurrenceDissent", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Dissent2": { "label": "Dissent2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinDissent2": { "label": "JoinDissent2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ConcurrenceDissent2": { "label": "ConcurrenceDissent2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Dissent3": { "label": "Dissent3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinDissent3": { "label": "JoinDissent3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ConcurrenceDissent3": { "label": "ConcurrenceDissent3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Dissent4": { "label": "Dissent4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinDissent4": { "label": "JoinDissent4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ConcurrenceDissent4": { "label": "ConcurrenceDissent4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Dissent5": { "label": "Dissent5", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinDissent5": { "label": "JoinDissent5", "type": "string", "required": false, "suggested": false, "deprecated": true }, "NotParticipating": { "label": "NotParticipating", "type": "string", "required": false, "suggested": false, "deprecated": true }, "LawsApplied": { "label": "LawsApplied", "type": "string", "required": false, "suggested": false, "deprecated": true }, "laws_applied": { "label": "laws_applied", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Superseded": { "label": "Superseded", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Overruled": { "label": "Overruled", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Overturned previous case": { "label": "Overturned previous case", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Abrogated": { "label": "Abrogated", "type": "string", "required": false, "suggested": false, "deprecated": true }, "keywords": { "label": "keywords", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": " A list of keywords that describe the legal issues dealt with by the case. List keywords alphabetically, separate them with {{Flatlist}} or {{hlist}}, and link them to appropriate Wikipedia articles wherever possible; for example: {{hlist| [[Bailment]] |[[common carrier]] |[[negligence]] |[[strict liability]] }}", "aliases": [ "Keywords" ] }, "Area of Law": { "label": "Area of Law", "type": "string", "required": false, "suggested": false, "deprecated": true }, "italic title": { "label": "italic title", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "Indicates that the page title should be italicized. Valid values are \"yes\", \"no\" or \"force\"." } }, "format": "block" } </templatedata> == Tracking category == * {{clc|Pages using infobox court case with unknown parameters}} ==See also== * Cases of the [[Supreme Court of Canada]]&nbsp;– {{tl|Infobox SCC}} * Cases of the [[courts of England and Wales]]&nbsp;– {{tl|Infobox English case}} * Cases of European international courts&nbsp;– {{tl|Infobox European case}} * All Philippine court cases&nbsp;– {{tl|Infobox Philippines court case}} * Cases of the [[Supreme Court of the United States]]&nbsp;– {{tl|Infobox SCOTUS case}}, {{tl|SCOTUS-case}}, {{tl|SCOTUS-recentcase}}, {{tl|Infobox US court case}} ** Cases of the [[United States courts of appeals]]&nbsp;– {{tl|Infobox COA case}} ** Cases of the [[United States district courts]]&nbsp;– {{tl|Infobox United States District Court case}} ** Cases of the [[Supreme Court of California]]&nbsp;– {{tl|Infobox California Supreme Court case}} ** Cases of the [[New York Court of Appeals]]&nbsp;– {{tl|Infobox New York COA case}} * {{tl|Infobox legislation}} <includeonly>{{basepage subpage| <!-- Categories go here, and interwikis go in Wikidata --> [[Category:Court box templates]] [[Category:Law infobox templates|Court case]] [[Category:Templates that add a tracking category]] }}</includeonly> 62867e2d59113bf9dabd775250a29360a6ad4439 Template:Notice 10 207 580 2023-01-25T22:32:14Z en>Izno 0 per tper wikitext text/x-wiki {{Mbox | name = Notice | demospace = {{{demospace|}}} | style = {{#if:{{{style|}}} |{{{style}}} }} | subst = <includeonly>{{subst:substcheck}}</includeonly> | type = notice | image = {{#if:{{{image|}}} |[[File:{{{image}}}|40px|Notice|alt={{{imagealt|}}}]]}} | small = {{{small|}}} | smallimage = {{#if:{{{image|}}} |[[File:{{{image}}}|30px|Notice|alt={{{imagealt|}}}]]}} | imageright = {{#if:{{{imageright|}}} |{{{imageright}}} |{{#if:{{{shortcut|{{{shortcut1|}}}}}} |{{Ombox/shortcut|{{{shortcut|{{{shortcut1|}}}}}}|{{{shortcut2|}}}|{{{shortcut3|}}}|{{{shortcut4|}}}|{{{shortcut5|}}}}}}} }} | textstyle = {{{textstyle|text-align: {{#if:{{{center|}}}|center|{{{align|left}}}}};}}} | text = {{#if:{{{header|{{{heading|{{{title|}}}}}}}}} |<div style="{{{headstyle|text-align: {{#if:{{{center|}}}|center|left}};}}}">'''{{{header|{{{heading|{{{title|}}}}}}}}}'''</div>}}<!-- -->{{{text|{{{content|{{{reason|{{{1}}}}}}}}}}}} }}<noinclude> {{Documentation}} </noinclude> 2cbdbb721ca517005f6827650eef5b0f17537a43 Module:If empty 828 49 528 202 2023-01-26T18:33:28Z en>MSGJ 0 lastk is not needed Scribunto text/plain local p = {} function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false}) for k,v in ipairs(args) do if v ~= '' then return v end end end return p 4790391408957dea3ff9f453834c05f6b379a45c Template:Update 10 205 572 2023-01-29T20:19:24Z en>Pppery 0 Per edit request wikitext text/x-wiki {{ {{{|safesubst:}}}#invoke:Unsubst||date=__DATE__ |$B= {{main other | demospace = {{{demospace|}}} |{{ambox | name = Update | subst = <includeonly>{{subst:substcheck}}</includeonly> | type = content | class = ambox-Update | image = [[File:{{Ambox globe current red}}|42px|link=|alt=]] | issue = {{#if:{{{part|{{{1|}}}}}} |{{#ifeq:{{{part|{{{1|}}}}}}|section |{{#if:{{{inaccurate|}}} |This section's '''[[Wikipedia:Accuracy dispute|factual accuracy]] may be compromised due to out-of-date information''' |This section needs to be '''updated'''}} |{{#if:{{{inaccurate|}}} |The '''[[Wikipedia:Accuracy dispute|factual accuracy]]''' of parts of this article (those related to {{{part|{{{1|}}}}}}) '''may be compromised due to out-of-date information''' |Parts of this article (those related to {{{part|{{{1|}}}}}}) need to be '''updated'''}} }} |{{#if:{{{inaccurate|}}} |This article's '''[[Wikipedia:Accuracy dispute|factual accuracy]] may be compromised due to out-of-date information''' |This article needs to be '''updated'''}} }}. {{#if:{{{reason|}}}|The reason given is: {{{reason}}}.}} | fix = Please help update this {{{type|{{SUBJECTSPACE formatted}}}}} to reflect recent events or newly available information. {{#if:{{{2|{{{updated|}}}}}} |<br /><small>Last update: {{{2|{{{updated}}}}}}</small> }} | talk = {{{talk|{{{talksection|{{{discuss|}}}}}}}}} | date = {{{date|}}} | cat = {{#if:{{{inaccurate|}}}|Articles with obsolete information|Wikipedia articles in need of updating}} | all = All Wikipedia articles in need of updating | all2 = {{{cat|}}} }} |{{mbox | name = Update | subst = <includeonly>{{subst:substcheck}}</includeonly> | type = content | class = ambox-Update | image = [[File:{{Ambox globe current red}}|42px|link=|alt=]] | text = {{#if:{{{part|{{{1|}}}}}} |{{#if:{{{inaccurate|}}} |The '''[[Wikipedia:Accuracy dispute|factual accuracy]]''' of parts of this {{{type|{{SUBJECTSPACE formatted}}}}} (those related to {{{part|{{{1|}}}}}}) '''may be compromised due to out-of-date information''' |Parts of this {{{type|{{SUBJECTSPACE formatted}}}}} (those related to {{{part|{{{1|}}}}}}) need to be '''updated'''}} |{{#if:{{{inaccurate|}}} |The '''[[Wikipedia:Accuracy dispute|factual accuracy]]''' of this {{{type|{{SUBJECTSPACE formatted}}}}} '''may be compromised due to out-of-date information''' |This {{{type|{{SUBJECTSPACE formatted}}}}} needs to be '''updated'''}} }}. {{#if:{{{reason|}}}|The reason given is: {{{reason}}}.}} Please help update this {{{type|{{SUBJECTSPACE formatted}}}}} to reflect recent events or newly available information. {{#ifexist: {{TALKPAGENAME}} |Relevant discussion may be found on {{#if: {{{talk|{{{talksection|{{{discuss|}}}}}}}}} | [[{{TALKPAGENAME}}#{{{talk|{{{talksection|{{{discuss}}}}}}}}}|the talk page]] | [[{{TALKPAGENAME}}| the talk page]] }}.}} {{#if:{{{date|}}}|<small>''({{{date}}})''</small>}} {{#if:{{{2|{{{updated|}}}}}} |<br /><small>Last update: {{{2|{{{updated}}}}}}</small> }} }} }} }}<noinclude> <!-- Place categories on /doc subpage; interwikis go to Wikidata. --> {{Documentation}} </noinclude> 7dca1948836f52c31882d2bf59eb29dc012f5aac Template:Infobox court/doc 10 200 558 2023-02-09T22:42:49Z en>Superb Owl 0 removed parameters that I added but couldn't get to work wikitext text/x-wiki {{Documentation subpage}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> {{Lua|Module:Infobox|Module:InfoboxImage|Module:Check for unknown parameters}} {{tlc|{{BASEPAGENAME}}}} can be used to provide at-a-glance information at the start of an article about a court. == Usage == {{Parameter names example | court_name | native_name | image | image_upright | imagesize | alt | caption | image2 | image_upright2 | imagesize2 | alt2 | caption2 | established | dissolved | jurisdiction | location | coordinates | motto | type | authority | appealsto | appealsfrom | terms | positions | budget | language | tribunal-type | website | chiefjudgetitle | chiefjudgename | termstart | termend | termend2 | chiefjudgetitle2 | chiefjudgename2 | termstart2 | termend3 | termend4 | chiefjudgetitle3 | chiefjudgename3 | termstart3 | termend5 | termend6 | division_map | division_map_upright | division_map_size | division_map_alt | division_caption }} <pre style="overflow:auto"> {{Infobox court | court_name = | native_name = <!-- native name of the court, if different --> | image = | image_upright = <!-- [[Wikipedia:Autosizing images|image scaling factor]] for image, if applicable --> | imagesize = Image_upright if preferred | alt = | caption = | image2 = | image_upright2 = | imagesize2 = | alt2 = | caption2 = | established = <!-- use {{start date|YYYY|MM|DD}} --> | dissolved = <!-- use {{end date|YYYY|MM|DD}} --> | jurisdiction = <!-- Official jurisdiction --> | location = <!-- city, state/province, country --> | coordinates = <!-- {{coord|45.000|-122.000|display=inline,title}} --> | motto = | type = <!-- partisan election/non-partisan election/legislative selection/executive selection/co-option/etc --> | authority = <!-- constitution/statute/monarch or | at = --> | appealsto = <!-- appeals from this court go where --> | appealsfrom = <!-- appeals from what other courts are heard by this --> | terms = <!-- length of court term for judges --> | positions = <!-- number of positions/seats on court --> | budget = <!-- amount of annual budget --> | language = | tribunal-type = | website = <!-- official website. Use {{Tl|URL}} --> | chiefjudgetitle = <!-- title of the top judge such as chief justice/senior judge --> | chiefjudgename = <!-- current chief's name --> | termstart = <!-- year current chief became chief --> | termend = <!-- lead position ends --> | termend2 = <!-- jurist term ends --> | chiefjudgetitle2 = <!-- title of the second top judge if applicable --> | chiefjudgename2 = <!-- current deputy chief's name --> | termstart2 = <!-- year current deputy chief became chief --> | termend3 = <!-- lead position ends --> | termend4 = <!-- jurist term ends --> | chiefjudgetitle3 = <!-- title of the second top judge if applicable --> | chiefjudgename3 = <!-- current deputy chief's name --> | termstart3 = <!-- year current deputy chief became chief --> | termend5 = <!-- lead position ends --> | termend6 = <!-- jurist term ends --> | division_map = <!-- image for a map of division separations, if applicable --> | division_map_upright = <!-- [[Wikipedia:Autosizing images|image scaling factor]] for map of division, if applicable --> | division_map_size = <!-- size of division map above, if applicable --> | division_map_alt = <!-- alt text for division map above, if applicable --> | division_caption = }} </pre> {{clear}} == Example == {{Infobox court | court_name = District Court of New South Wales | image = Coat of Arms of New South Wales.svg | alt = Coat of Arms of New South Wales | image2 = SLNSW 479525 22 Court House Darlinghurst front view SH 571.jpg | alt2 = Darlinghurst Courthouse, pictured in 1872, a seat of the District Court | caption2 = [[Darlinghurst Courthouse]], pictured in 1872, a seat of the District Court | established = 1858 | jurisdiction = [[New South Wales]] | location = Full time sittings are held in the [[Sydney central business district|Sydney CBD]], and at [[Parramatta]], [[Penrith, New South Wales|Penrith]], [[Campbelltown, New South Wales|Campbelltown]], [[Newcastle, New South Wales|Newcastle]], [[Gosford]], [[Wollongong]] and [[Lismore, New South Wales|Lismore]]. Part time sittings are held in a range of major regional centres. | type = [[Governor of New South Wales|Vice-regal]] appointment upon nomination by the [[Premier of New South Wales|Premier]] following the advice of the [[Attorney General of New South Wales|Attorney General]] and [[Executive Council of New South Wales|Cabinet]]<!-- partisan election/non-partisan election/legislative selection/executive selection/co-option/etc --> | authority = [[Parliament of New South Wales|New South Wales Parliament]] via the {{Cite Legislation AU|NSW|act||District Court Act 1973}} (formerly the {{Cite Legislation AU|NSW|act||District Courts Act 1858}})<!-- constitution/statute/monarch--> | appealsto = [[Supreme Court of New South Wales]] <!-- appeals from this court go where --> | appealsfrom = [[Local Court of New South Wales]]<!-- appeals from what other courts are heard by this --> | website = [http://www.lawlink.nsw.gov.au/lawlink/district_court/ll_districtcourt.nsf/pages/dc_index www.lawlink.nsw.gov.au/dc]<!-- official website --> | chiefjudgetitle = Chief Judge<!-- title of the top judge such as chief justice/senior judge --> | chiefjudgename = Derek Michael Price {{post-nominals|country=AUS|AM}}<!-- current chief's name --> | termstart = 2014<!-- year current chief became chief --> }} <pre style="overflow:auto"> {{Infobox court | court_name = District Court of New South Wales | image = Coat of Arms of New South Wales.svg | alt = Coat of Arms of New South Wales | image2 = SLNSW 479525 22 Court House Darlinghurst front view SH 571.jpg | alt2 = Darlinghurst Courthouse, pictured in 1872, a seat of the District Court | caption2 = [[Darlinghurst Courthouse]], pictured in 1872, a seat of the District Court | established = 1858 | jurisdiction = [[New South Wales]] | location = Full time sittings are held in the [[Sydney central business district|Sydney CBD]], and at [[Parramatta]], [[Penrith, New South Wales|Penrith]], [[Campbelltown, New South Wales|Campbelltown]], [[Newcastle, New South Wales|Newcastle]], [[Gosford]], [[Wollongong]] and [[Lismore, New South Wales|Lismore]]. Part time sittings are held in a range of major regional centres. | type = [[Governor of New South Wales|Vice-regal]] appointment upon nomination by the [[Premier of New South Wales|Premier]] following the advice of the [[Attorney General of New South Wales|Attorney General]] and [[Executive Council of New South Wales|Cabinet]]<!-- partisan election/non-partisan election/legislative selection/executive selection/co-option/etc --> | authority = [[Parliament of New South Wales|New South Wales Parliament]] via the {{Cite Legislation AU|NSW|act||District Court Act 1973}} (formerly the {{Cite Legislation AU|NSW|act||District Courts Act 1858}})<!-- constitution/statute/monarch--> | appealsto = [[Supreme Court of New South Wales]] <!-- appeals from this court go where --> | appealsfrom = [[Local Court of New South Wales]]<!-- appeals from what other courts are heard by this --> | website = [http://www.lawlink.nsw.gov.au/lawlink/district_court/ll_districtcourt.nsf/pages/dc_index www.lawlink.nsw.gov.au/dc]<!-- official website --> | chiefjudgetitle = Chief Judge<!-- title of the top judge such as chief justice/senior judge --> | chiefjudgename = Derek Michael Price {{post-nominals|country=AUS|AM}}<!-- current chief's name --> | termstart = 2014<!-- year current chief became chief --> }} </pre> {{clear}} == Microformat == {{UF-hcard-org}} == TemplateData == {{TemplateData header}} <templatedata> { "params": { "court_name": {}, "native_name": {}, "image": {}, "image_upright": {}, "imagesize": {}, "caption": {}, "image2": {}, "image_upright2": {}, "imagesize2": {}, "caption2": {}, "dissolved": {}, "coordinates": {}, "motto": {}, "at": {}, "appealsto": { "aliases": [ "appeals" ] }, "appealsfrom": {}, "terms": {}, "budget": {}, "chiefjudgetitle": {}, "chiefjudgename": {}, "termstart": {}, "termend": {}, "termend2": {}, "chiefjudgetitle2": {}, "chiefjudgename2": {}, "termstart2": {}, "termend3": {}, "termend4": {}, "alt": {}, "alt2": {}, "established": {}, "authority": {}, "positions": {}, "language": {}, "tribunal-type": {}, "website": {}, "jurisdiction": {}, "location": {}, "type": {}, "chiefjudgetitle3": {}, "chiefjudgename3": {}, "termstart3": {}, "termend5": {}, "termend6": {}, "division_map": {}, "division_map_upright": {}, "division_map_size": {}, "division_map_alt": {}, "division_caption": {} }, "paramOrder": [ "court_name", "native_name", "image", "image_upright", "imagesize", "alt", "caption", "image2", "image_upright2", "imagesize2", "alt2", "caption2", "established", "dissolved", "coordinates", "motto", "at", "authority", "appealsto", "appealsfrom", "terms", "positions", "budget", "language", "tribunal-type", "website", "chiefjudgetitle", "chiefjudgename", "termstart", "termend", "termend2", "chiefjudgetitle2", "chiefjudgename2", "termstart2", "termend3", "termend4", "jurisdiction", "location", "type", "chiefjudgetitle3", "chiefjudgename3", "termstart3", "termend5", "termend6", "division_map", "division_map_upright", "division_map_size", "division_map_alt", "division_caption" ], "description": "infobox template for courts", "format": "block" } </templatedata> == Tracking categories == * {{clc|Category:Pages using infobox court with unknown parameters}} == See also == * {{tl|Infobox judge}} * {{tl|Infobox U.S. federal court}} {{Organization infoboxes}} <includeonly>{{sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> [[Category:Law infobox templates|Court]] [[Category:Politics and government infobox templates|Court]] [[Category:Templates that add a tracking category|{{PAGENAME}}]] }}</includeonly> c855a40a2a422a78f0ac88f6954e0ab03c61aac0 Module:Lua banner 828 54 468 104 2023-02-16T14:39:53Z en>Uzume 0 [[Module:Citation]] has been blanked since [[Wikipedia:Templates for discussion/Log/2018 May 13#Module:Citation]]; remove special handling Scribunto text/plain -- This module implements the {{lua}} template. local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local p = {} function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end function p._main(args) local modules = mTableTools.compressSparseArray(args) local box = p.renderBox(modules) local trackingCategories = p.renderTrackingCategories(args, modules) return box .. trackingCategories end function p.renderBox(modules) local boxArgs = {} if #modules < 1 then boxArgs.text = '<strong class="error">Error: no modules specified</strong>' else local moduleLinks = {} for i, module in ipairs(modules) do moduleLinks[i] = string.format('[[:%s]]', module) local maybeSandbox = mw.title.new(module .. '/sandbox') if maybeSandbox.exists then moduleLinks[i] = moduleLinks[i] .. string.format(' ([[:%s|sandbox]])', maybeSandbox.fullText) end end local moduleList = mList.makeList('bulleted', moduleLinks) local title = mw.title.getCurrentTitle() if title.subpageText == "doc" then title = title.basePageTitle end if title.contentModel == "Scribunto" then boxArgs.text = 'This module depends on the following other modules:' .. moduleList else boxArgs.text = 'This template uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList end end boxArgs.type = 'notice' boxArgs.small = true boxArgs.image = '[[File:Lua-Logo.svg|30px|alt=|link=]]' return mMessageBox.main('mbox', boxArgs) end function p.renderTrackingCategories(args, modules, titleObj) if yesno(args.nocat) then return '' end local cats = {} -- Error category if #modules < 1 then cats[#cats + 1] = 'Lua templates with errors' end -- Lua templates category titleObj = titleObj or mw.title.getCurrentTitle() local subpageBlacklist = { doc = true, sandbox = true, sandbox2 = true, testcases = true } if not subpageBlacklist[titleObj.subpageText] then local protCatName if titleObj.namespace == 10 then local category = args.category if not category then local categories = { ['Module:String'] = 'Templates based on the String Lua module', ['Module:Math'] = 'Templates based on the Math Lua module', ['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module', ['Module:Citation/CS1'] = 'Templates based on the Citation/CS1 Lua module' } category = modules[1] and categories[modules[1]] category = category or 'Lua-based templates' end cats[#cats + 1] = category protCatName = "Templates using under-protected Lua modules" elseif titleObj.namespace == 828 then protCatName = "Modules depending on under-protected modules" end if not args.noprotcat and protCatName then local protLevels = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } local currentProt if titleObj.id ~= 0 then -- id is 0 (page does not exist) if am previewing before creating a template. currentProt = titleObj.protectionLevels["edit"][1] end if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end for i, module in ipairs(modules) do if module ~= "WP:libraryUtil" then local moduleProt = mw.title.new(module).protectionLevels["edit"][1] if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end if moduleProt < currentProt then cats[#cats + 1] = protCatName break end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end return p 03ec1b34a40121efc562c0c64a67ebbf57d56dff Template:ECLI 10 208 582 2023-03-12T14:39:48Z en>Marc Schroeder 0 added case AT; to case NL added an optional parameter db (db=NL_RECHTSPRAAK or db=NL_TUCHTRECHT); documentation will follow wikitext text/x-wiki <includeonly>{{#switch: {{#invoke:String|sub|{{{ECLI|{{{1}}}}}}|6|7}} |NL = {{#switch: {{{db|}}} |NL_TUCHTRECHT = [https://tuchtrecht.overheid.nl/zoeken/resultaat/uitspraak/{{#invoke:String|replace|{{{ECLI|{{{1}}}}}}|:|_}} {{{ECLI|{{{1}}}}}}] |NL_RECHTSPRAAK |#default = [https://deeplink.rechtspraak.nl/uitspraak?id={{{ECLI|{{{1}}}}}} {{{ECLI|{{{1}}}}}}] }} |AT = [https://www.ris.bka.gv.at/Ergebnis.wxe?Suchworte={{{ECLI|{{{1}}}}}}&Abfrage=Gesamtabfrage {{{ECLI|{{{1}}}}}}] |BE = [https://juportal.be/content/{{{ECLI|{{{1}}}}}} {{{ECLI|{{{1}}}}}}] |CE = [https://hudoc.echr.coe.int/eng#%7B%22ecli%22:%5B%22{{{ECLI|{{{1}}}}}}%22%5D%7D {{{ECLI|{{{1}}}}}}] |EU = [https://eur-lex.europa.eu/legal-content/EN/ALL/?uri=ecli:{{{ECLI|{{{1}}}}}} {{{ECLI|{{{1}}}}}}] |CZ |DE |EP |ES |FI |FR |SI = [https://e-justice.europa.eu/ecli/{{{ECLI|{{{1}}}}}} {{{ECLI|{{{1}}}}}}] |SK = [https://otvorenesudy.sk/decrees?l=en&q={{{ECLI|{{{1}}}}}} {{{ECLI|{{{1}}}}}}] |#default = {{{ECLI|{{{1}}}}}} }}</includeonly><noinclude>{{Documentation}}</noinclude> 36d073663124b4dd9781e8044b15fadc3d7b052d Module:High-use 828 111 464 281 2023-03-20T02:08:21Z en>SWinxy 0 fmt Scribunto text/plain local p = {} -- _fetch looks at the "demo" argument. local _fetch = require('Module:Transclusion_count').fetch local yesno = require('Module:Yesno') function p.num(frame, count) if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end -- Build output string local return_value = "" if count == nil then if frame.args[1] == "risk" then return_value = "a very large number of" else return_value = "many" end else -- Use 2 significant figures for smaller numbers and 3 for larger ones local sigfig = 2 if count >= 100000 then sigfig = 3 end -- Prepare to round to appropriate number of sigfigs local f = math.floor(math.log10(count)) - sigfig + 1 -- Round and insert "approximately" or "+" when appropriate if (frame.args[2] == "yes") or (mw.ustring.sub(frame.args[1],-1) == "+") then -- Round down return_value = string.format("%s+", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) ) * (10^(f))) ) else -- Round to nearest return_value = string.format("approximately&#x20;%s", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) + 0.5) * (10^(f))) ) end -- Insert percentage of pages if that is likely to be >= 1% and when |no-percent= not set to yes if count and count > 250000 and not yesno (frame:getParent().args['no-percent']) then local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5) if percent >= 1 then return_value = string.format("%s&#x20;pages, or roughly %s%% of all", return_value, percent) end end end return return_value end -- Actions if there is a large (greater than or equal to 100,000) transclusion count function p.risk(frame) local return_value = "" if frame.args[1] == "risk" then return_value = "risk" else local count = _fetch(frame) if count and count >= 100000 then return_value = "risk" end end return return_value end function p.text(frame, count) -- Only show the information about how this template gets updated if someone -- is actually editing the page and maybe trying to update the count. local bot_text = (frame:preprocess("{{REVISIONID}}") == "") and "\n\n----\n'''Preview message''': Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]])." or '' if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end local title = mw.title.getCurrentTitle() if title.subpageText == "doc" or title.subpageText == "sandbox" then title = title.basePageTitle end local systemMessages = frame.args['system'] if frame.args['system'] == '' then systemMessages = nil end -- This retrieves the project URL automatically to simplify localiation. local templateCount = ('on [https://linkcount.toolforge.org/index.php?project=%s&page=%s %s pages]'):format( mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'), mw.uri.encode(title.fullText), p.num(frame, count)) local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used '; if systemMessages then used_on_text = used_on_text .. systemMessages .. ((count and count > 2000) and ("''', and " .. templateCount) or ("'''")) else used_on_text = used_on_text .. templateCount .. "'''" end local sandbox_text = ("%s's [[%s/sandbox|/sandbox]] or [[%s/testcases|/testcases]] subpages, or in your own [[%s]]. "):format( (mw.title.getCurrentTitle().namespace == 828 and "module" or "template"), title.fullText, title.fullText, mw.title.getCurrentTitle().namespace == 828 and "Module:Sandbox|module sandbox" or "Wikipedia:User pages#SUB|user subpage" ) local infoArg = frame.args["info"] ~= "" and frame.args["info"] if (systemMessages or frame.args[1] == "risk" or (count and count >= 100000) ) then local info = systemMessages and '.<br/>Changes to it can cause immediate changes to the Wikipedia user interface.' or '.' if infoArg then info = info .. "<br />" .. infoArg end sandbox_text = info .. '<br /> To avoid major disruption' .. (count and count >= 100000 and ' and server load' or '') .. ', any changes should be tested in the ' .. sandbox_text .. 'The tested changes can be added to this page in a single edit. ' else sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' and c') .. 'hanges may be widely noticed. Test changes in the ' .. sandbox_text end local discussion_text = systemMessages and 'Please discuss changes ' or 'Consider discussing changes ' if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then discussion_text = string.format("%sat [[%s]]", discussion_text, frame.args["2"]) else discussion_text = string.format("%son the [[%s|talk page]]", discussion_text, title.talkPageTitle.fullText ) end return used_on_text .. sandbox_text .. discussion_text .. " before implementing them." .. bot_text end function p.main(frame) local count = nil if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end local image = "[[File:Ambox warning yellow.svg|40px|alt=Warning|link=]]" local type_param = "style" local epilogue = '' if frame.args['system'] and frame.args['system'] ~= '' then image = "[[File:Ambox important.svg|40px|alt=Warning|link=]]" type_param = "content" local nocat = frame:getParent().args['nocat'] or frame.args['nocat'] local categorise = (nocat == '' or not yesno(nocat)) if categorise then epilogue = frame:preprocess('{{Sandbox other||{{#switch:{{#invoke:Effective protection level|{{#switch:{{NAMESPACE}}|File=upload|#default=edit}}|{{FULLPAGENAME}}}}|sysop|templateeditor|interfaceadmin=|#default=[[Category:Pages used in system messages needing protection]]}}}}') end elseif (frame.args[1] == "risk" or (count and count >= 100000)) then image = "[[File:Ambox warning orange.svg|40px|alt=Warning|link=]]" type_param = "content" end if frame.args["form"] == "editnotice" then return frame:expandTemplate{ title = 'editnotice', args = { ["image"] = image, ["text"] = p.text(frame, count), ["expiry"] = (frame.args["expiry"] or "") } } .. epilogue else return require('Module:Message box').main('ombox', { type = type_param, image = image, text = p.text(frame, count), expiry = (frame.args["expiry"] or "") }) .. epilogue end end return p 134551888e066954a89c109d2faa8af71a4454a4 Module:Transclusion count/data/I 828 115 470 289 2023-03-26T05:08:37Z en>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["IAAF_name"] = 2200, ["IAST"] = 5900, ["IBDB_name"] = 9000, ["ICD10"] = 4600, ["ICD9"] = 4400, ["ICS"] = 2800, ["IDN"] = 3300, ["IMDb_episode"] = 9600, ["IMDb_episodes"] = 2400, ["IMDb_name"] = 151000, ["IMDb_title"] = 186000, ["IMO_Number"] = 4000, ["IMSLP"] = 8100, ["INA"] = 2000, ["IND"] = 7500, ["INR"] = 6200, ["INRConvert"] = 5400, ["INRConvert/CurrentRate"] = 5400, ["INRConvert/USD"] = 5400, ["INRConvert/out"] = 5400, ["IOC_profile"] = 6000, ["IP"] = 2500, ["IPA"] = 139000, ["IPA-all"] = 3500, ["IPA-de"] = 7800, ["IPA-es"] = 7800, ["IPA-fr"] = 43000, ["IPA-it"] = 5800, ["IPA-nl"] = 3700, ["IPA-pl"] = 4000, ["IPA-pt"] = 3600, ["IPA-ru"] = 2600, ["IPA-sh"] = 2700, ["IPA-sl"] = 6900, ["IPA-th"] = 2900, ["IPA_audio_link"] = 19000, ["IPA_link"] = 3300, ["IPAc-cmn"] = 2600, ["IPAc-en"] = 47000, ["IPAc-pl"] = 52000, ["IPC_athlete"] = 2600, ["IPSummary"] = 77000, ["IP_summary"] = 78000, ["IPsock"] = 9200, ["IPtalk"] = 21000, ["IPuser"] = 6800, ["IPvandal"] = 2700, ["IRC"] = 6500, ["IRI"] = 2100, ["IRL"] = 5600, ["IRN"] = 3500, ["ISBN"] = 460000, ["ISBNT"] = 38000, ["ISBN_missing"] = 2200, ["ISFDB_name"] = 4000, ["ISFDB_title"] = 4500, ["ISL"] = 2100, ["ISO_15924/script-example-character"] = 2700, ["ISO_15924/wp-article"] = 2700, ["ISO_15924/wp-article/format"] = 2700, ["ISO_15924/wp-article/label"] = 2700, ["ISO_3166_code"] = 493000, ["ISO_3166_name"] = 16000, ["ISO_639_name"] = 7800, ["ISP"] = 5300, ["ISR"] = 4700, ["ISSN"] = 12000, ["ISSN_link"] = 30000, ["ISTAT"] = 8100, ["ISU_figure_skater"] = 2500, ["ITA"] = 17000, ["ITF"] = 6000, ["ITF_profile"] = 8900, ["ITIS"] = 4300, ["ITN_talk"] = 9600, ["ITN_talk/date"] = 9600, ["IUCN_banner"] = 15000, ["I_sup"] = 4500, ["Iaaf_name"] = 7400, ["Ice_hockey"] = 20000, ["Ice_hockey_stats"] = 16000, ["Icehockeystats"] = 11000, ["Icon"] = 565000, ["If"] = 262000, ["If_all"] = 5900, ["If_between"] = 3700, ["If_both"] = 9970000, ["If_empty"] = 2950000, ["If_first_display_both"] = 61000, ["If_in_page"] = 8200, ["If_last_display_both"] = 30000, ["If_preview"] = 57000, ["If_then_show"] = 259000, ["Ifempty"] = 4000, ["Ifeq"] = 16000, ["Iferror_then_show"] = 3200, ["Ifexist_not_redirect"] = 1100000, ["Ifnotempty"] = 14000, ["Ifnumber"] = 32000, ["Ifsubst"] = 95000, ["Ih"] = 7400, ["Ill"] = 111000, ["Illm"] = 6900, ["Image_frame"] = 3700, ["Image_label"] = 4500, ["Image_label_begin"] = 3800, ["Image_label_end"] = 3500, ["Image_label_small"] = 2600, ["Image_needed"] = 4500, ["Image_other"] = 279000, ["Image_requested"] = 170000, ["Image_requested/Category_helper"] = 162000, ["Imbox"] = 909000, ["Imdb_name"] = 5400, ["Imdb_title"] = 4300, ["Import_style"] = 10000, ["Import_style/inputbox.css"] = 10000, ["Importance"] = 5500000, ["Importance/colour"] = 5510000, ["Importance_mask"] = 8540000, ["Improve_categories"] = 6600, ["In_class"] = 5600, ["In_lang"] = 350000, ["In_progress"] = 3100, ["In_string"] = 69000, ["In_title"] = 18000, ["Inactive_WikiProject_banner"] = 214000, ["Inactive_userpage_blanked"] = 4900, ["Include-USGov"] = 29000, ["Incomplete_list"] = 22000, ["Inconclusive"] = 2000, ["Increase"] = 41000, ["Incumbent_pope"] = 4300, ["Indent"] = 4200, ["IndexFungorum"] = 2200, ["Indian_English"] = 4200, ["Indian_Rupee"] = 10000, ["Indian_railway_code"] = 3100, ["Inflation"] = 18000, ["Inflation-fn"] = 5300, ["Inflation-year"] = 4300, ["Inflation/IN/startyear"] = 5400, ["Inflation/UK"] = 4200, ["Inflation/UK/dataset"] = 4200, ["Inflation/UK/startyear"] = 4200, ["Inflation/US"] = 11000, ["Inflation/US/dataset"] = 11000, ["Inflation/US/startyear"] = 11000, ["Inflation/fn"] = 6000, ["Inflation/year"] = 23000, ["Info"] = 7200, ["Infobox"] = 3180000, ["Infobox/Columns"] = 2300, ["Infobox/mobileviewfix.css"] = 24000, ["Infobox3cols"] = 16000, ["Infobox_AFL_biography"] = 14000, ["Infobox_Aircraft_Begin"] = 5400, ["Infobox_Aircraft_Type"] = 4800, ["Infobox_Athletics_Championships"] = 2600, ["Infobox_Australian_place"] = 15000, ["Infobox_CFL_biography"] = 2300, ["Infobox_COA_wide"] = 3100, ["Infobox_Canada_electoral_district"] = 2400, ["Infobox_Canadian_Football_League_biography"] = 5900, ["Infobox_Canadian_Football_League_biography/position"] = 5800, ["Infobox_Chinese"] = 20000, ["Infobox_Chinese/Chinese"] = 2600, ["Infobox_Chinese/Footer"] = 8700, ["Infobox_Chinese/Header"] = 8700, ["Infobox_Chinese/Korean"] = 17000, ["Infobox_Christian_leader"] = 18000, ["Infobox_Election"] = 2400, ["Infobox_French_commune"] = 38000, ["Infobox_GAA_player"] = 3200, ["Infobox_Gaelic_games_player"] = 4900, ["Infobox_German_location"] = 13000, ["Infobox_German_place"] = 14000, ["Infobox_Greece_place"] = 2800, ["Infobox_Greek_Dimos"] = 2800, ["Infobox_Hindu_temple"] = 2400, ["Infobox_Indian_state_legislative_assembly_constituency"] = 3900, ["Infobox_Italian_comune"] = 8100, ["Infobox_Korean_name"] = 15000, ["Infobox_Korean_name/categories"] = 15000, ["Infobox_MLB_yearly"] = 3100, ["Infobox_NASCAR_race_report"] = 2000, ["Infobox_NCAA_team_season"] = 18000, ["Infobox_NFL_biography"] = 27000, ["Infobox_NFL_player"] = 8100, ["Infobox_NFL_season"] = 2600, ["Infobox_NFL_team_season"] = 3900, ["Infobox_NRHP"] = 72000, ["Infobox_NRHP/conv"] = 18000, ["Infobox_NRHP/locmapin2region"] = 66000, ["Infobox_Officeholder"] = 5200, ["Infobox_Olympic_event"] = 7300, ["Infobox_Olympic_event/games_text"] = 7300, ["Infobox_Paralympic_event"] = 2500, ["Infobox_Paralympic_event/games_text"] = 2500, ["Infobox_Politician"] = 2200, ["Infobox_Romanian_subdivision"] = 3100, ["Infobox_Russian_district"] = 2000, ["Infobox_Russian_inhabited_locality"] = 4400, ["Infobox_SCOTUS_case"] = 3700, ["Infobox_Site_of_Special_Scientific_Interest"] = 2000, ["Infobox_Swiss_town"] = 2800, ["Infobox_Switzerland_municipality"] = 2900, ["Infobox_Turkey_place"] = 11000, ["Infobox_U.S._county"] = 3000, ["Infobox_U.S._county/district"] = 3000, ["Infobox_UK_constituency"] = 2100, ["Infobox_UK_constituency/year"] = 2100, ["Infobox_UK_legislation"] = 2500, ["Infobox_UK_place"] = 25000, ["Infobox_UK_place/NoDialCode"] = 7800, ["Infobox_UK_place/NoPostCode"] = 2900, ["Infobox_UK_place/area"] = 2300, ["Infobox_UK_place/dist"] = 2500, ["Infobox_UK_place/local"] = 25000, ["Infobox_UK_place/styles.css"] = 25000, ["Infobox_UN_resolution"] = 2300, ["Infobox_US_Supreme_Court_case"] = 3800, ["Infobox_US_Supreme_Court_case/courts"] = 3800, ["Infobox_Wikipedia_user"] = 9400, ["Infobox_YouTube_personality"] = 2500, ["Infobox_academic"] = 13000, ["Infobox_aircraft_begin"] = 14000, ["Infobox_aircraft_occurrence"] = 2200, ["Infobox_aircraft_type"] = 12000, ["Infobox_airline"] = 4500, ["Infobox_airport"] = 15000, ["Infobox_airport/datatable"] = 14000, ["Infobox_album"] = 160000, ["Infobox_album/color"] = 188000, ["Infobox_album/link"] = 160000, ["Infobox_anatomy"] = 4400, ["Infobox_ancient_site"] = 5200, ["Infobox_animanga/Footer"] = 6700, ["Infobox_animanga/Header"] = 6700, ["Infobox_animanga/Print"] = 5300, ["Infobox_animanga/Video"] = 4600, ["Infobox_architect"] = 3600, ["Infobox_artist"] = 28000, ["Infobox_artist_discography"] = 5900, ["Infobox_artwork"] = 11000, ["Infobox_athlete"] = 3100, ["Infobox_automobile"] = 8300, ["Infobox_award"] = 12000, ["Infobox_badminton_player"] = 3200, ["Infobox_baseball_biography"] = 28000, ["Infobox_baseball_biography/style"] = 28000, ["Infobox_baseball_biography/styles.css"] = 28000, ["Infobox_basketball_biography"] = 20000, ["Infobox_basketball_biography/style"] = 20000, ["Infobox_basketball_club"] = 3000, ["Infobox_beauty_pageant"] = 2400, ["Infobox_bilateral_relations"] = 4300, ["Infobox_body_of_water"] = 17000, ["Infobox_book"] = 51000, ["Infobox_boxer"] = 5600, ["Infobox_bridge"] = 5900, ["Infobox_building"] = 26000, ["Infobox_character"] = 7800, ["Infobox_chess_biography"] = 3600, ["Infobox_chess_player"] = 3000, ["Infobox_church"] = 14000, ["Infobox_church/denomination"] = 14000, ["Infobox_church/font_color"] = 14000, ["Infobox_civil_conflict"] = 2300, ["Infobox_civilian_attack"] = 5100, ["Infobox_college_coach"] = 11000, ["Infobox_college_football_game"] = 2100, ["Infobox_college_sports_team_season"] = 38000, ["Infobox_college_sports_team_season/link"] = 38000, ["Infobox_college_sports_team_season/name"] = 38000, ["Infobox_college_sports_team_season/succession"] = 38000, ["Infobox_college_sports_team_season/team"] = 38000, ["Infobox_comic_book_title"] = 2900, ["Infobox_comics_character"] = 3600, ["Infobox_comics_creator"] = 3500, ["Infobox_comics_creator/styles.css"] = 3500, ["Infobox_company"] = 82000, ["Infobox_computing_device"] = 2300, ["Infobox_concert"] = 3200, ["Infobox_constituency"] = 5000, ["Infobox_country"] = 6200, ["Infobox_country/formernext"] = 5900, ["Infobox_country/imagetable"] = 5100, ["Infobox_country/multirow"] = 8100, ["Infobox_country/status_text"] = 2700, ["Infobox_country/styles.css"] = 6200, ["Infobox_country_at_games"] = 14000, ["Infobox_country_at_games/core"] = 14000, ["Infobox_country_at_games/see_also"] = 11000, ["Infobox_court_case"] = 4600, ["Infobox_court_case/images"] = 2400, ["Infobox_cricket_tournament"] = 2200, ["Infobox_cricketer"] = 32000, ["Infobox_cricketer/career"] = 32000, ["Infobox_cricketer/national_side"] = 7500, ["Infobox_criminal"] = 6100, ["Infobox_curler"] = 2600, ["Infobox_cycling_race_report"] = 4400, ["Infobox_cyclist"] = 16000, ["Infobox_dam"] = 5500, ["Infobox_designation_list"] = 19000, ["Infobox_designation_list/entry"] = 16000, ["Infobox_dim"] = 6800, ["Infobox_dim/core"] = 6800, ["Infobox_diocese"] = 3800, ["Infobox_drug"] = 9300, ["Infobox_drug/chemical_formula"] = 9300, ["Infobox_drug/data_page_link"] = 9300, ["Infobox_drug/formatATC"] = 9200, ["Infobox_drug/formatCASnumber"] = 9300, ["Infobox_drug/formatChEBI"] = 9300, ["Infobox_drug/formatChEMBL"] = 9300, ["Infobox_drug/formatChemDBNIAID"] = 9300, ["Infobox_drug/formatChemSpider"] = 9300, ["Infobox_drug/formatCompTox"] = 9300, ["Infobox_drug/formatDrugBank"] = 9300, ["Infobox_drug/formatIUPHARBPS"] = 9300, ["Infobox_drug/formatJmol"] = 9300, ["Infobox_drug/formatKEGG"] = 9300, ["Infobox_drug/formatPDBligand"] = 8600, ["Infobox_drug/formatPubChemCID"] = 9300, ["Infobox_drug/formatPubChemSID"] = 9300, ["Infobox_drug/formatUNII"] = 9300, ["Infobox_drug/legal_status"] = 9400, ["Infobox_drug/licence"] = 9300, ["Infobox_drug/maintenance_categories"] = 9300, ["Infobox_drug/non-ref-space"] = 3700, ["Infobox_drug/pregnancy_category"] = 9300, ["Infobox_drug/title"] = 9300, ["Infobox_election"] = 28000, ["Infobox_election/row"] = 28000, ["Infobox_election/shortname"] = 26000, ["Infobox_enzyme"] = 5100, ["Infobox_ethnic_group"] = 7100, ["Infobox_event"] = 5100, ["Infobox_family"] = 2000, ["Infobox_figure_skater"] = 4100, ["Infobox_film"] = 153000, ["Infobox_film/short_description"] = 149000, ["Infobox_film_awards"] = 2600, ["Infobox_film_awards/link"] = 2600, ["Infobox_film_awards/style"] = 2600, ["Infobox_food"] = 6700, ["Infobox_football_biography"] = 204000, ["Infobox_football_club"] = 27000, ["Infobox_football_club_season"] = 19000, ["Infobox_football_league"] = 2500, ["Infobox_football_league_season"] = 19000, ["Infobox_football_match"] = 5700, ["Infobox_football_tournament_season"] = 7500, ["Infobox_former_subdivision"] = 3300, ["Infobox_former_subdivision/styles.css"] = 3300, ["Infobox_galaxy"] = 2000, ["Infobox_game"] = 2400, ["Infobox_game_score"] = 3400, ["Infobox_gene"] = 13000, ["Infobox_given_name"] = 4000, ["Infobox_golfer"] = 4400, ["Infobox_golfer/highest_ranking"] = 4400, ["Infobox_government_agency"] = 10000, ["Infobox_government_cabinet"] = 2400, ["Infobox_gridiron_football_person"] = 2600, ["Infobox_gridiron_football_person/position"] = 5800, ["Infobox_gymnast"] = 3300, ["Infobox_handball_biography"] = 4800, ["Infobox_historic_site"] = 11000, ["Infobox_horseraces"] = 2600, ["Infobox_hospital"] = 6200, ["Infobox_hospital/care_system"] = 6200, ["Infobox_hospital/lists"] = 6200, ["Infobox_ice_hockey_biography"] = 20000, ["Infobox_ice_hockey_player"] = 19000, ["Infobox_ice_hockey_team"] = 3000, ["Infobox_ice_hockey_team_season"] = 2000, ["Infobox_international_football_competition"] = 5600, ["Infobox_islands"] = 8600, ["Infobox_islands/area"] = 9100, ["Infobox_islands/density"] = 9100, ["Infobox_islands/length"] = 8600, ["Infobox_islands/styles.css"] = 8600, ["Infobox_journal"] = 9600, ["Infobox_journal/Abbreviation_search"] = 9500, ["Infobox_journal/Bluebook_check"] = 9300, ["Infobox_journal/Former_check"] = 9300, ["Infobox_journal/ISO_4_check"] = 9300, ["Infobox_journal/ISSN-eISSN"] = 9400, ["Infobox_journal/Indexing_search"] = 9400, ["Infobox_journal/MathSciNet_check"] = 9300, ["Infobox_journal/NLM_check"] = 9300, ["Infobox_journal/frequency"] = 8500, ["Infobox_lake"] = 4500, ["Infobox_language"] = 9500, ["Infobox_language/family-color"] = 11000, ["Infobox_language/genetic"] = 6500, ["Infobox_language/linguistlist"] = 9500, ["Infobox_language/ref"] = 7100, ["Infobox_legislature"] = 3500, ["Infobox_library"] = 2100, ["Infobox_lighthouse"] = 2600, ["Infobox_lighthouse/light"] = 2600, ["Infobox_locomotive"] = 4800, ["Infobox_magazine"] = 7500, ["Infobox_manner_of_address"] = 3200, ["Infobox_mapframe"] = 79000, ["Infobox_martial_artist"] = 5500, ["Infobox_martial_artist/record"] = 5500, ["Infobox_medal_templates"] = 417000, ["Infobox_medical_condition"] = 10000, ["Infobox_medical_condition_(new)"] = 8200, ["Infobox_military_conflict"] = 21000, ["Infobox_military_installation"] = 9600, ["Infobox_military_person"] = 44000, ["Infobox_military_unit"] = 25000, ["Infobox_mine"] = 2100, ["Infobox_model"] = 2300, ["Infobox_mountain"] = 27000, ["Infobox_multi-sport_competition_event"] = 2200, ["Infobox_museum"] = 10000, ["Infobox_musical_artist"] = 120000, ["Infobox_musical_artist/color"] = 120000, ["Infobox_musical_artist/hCard_class"] = 309000, ["Infobox_musical_composition"] = 2800, ["Infobox_name"] = 7400, ["Infobox_name_module"] = 6400, ["Infobox_newspaper"] = 9400, ["Infobox_nobility"] = 2400, ["Infobox_noble"] = 7000, ["Infobox_officeholder"] = 209000, ["Infobox_officeholder/office"] = 214000, ["Infobox_official_post"] = 7800, ["Infobox_organization"] = 35000, ["Infobox_pageant_titleholder"] = 2800, ["Infobox_park"] = 7200, ["Infobox_person"] = 458000, ["Infobox_person/Wikidata"] = 5000, ["Infobox_person/height"] = 101000, ["Infobox_person/length"] = 7000, ["Infobox_person/weight"] = 65000, ["Infobox_philosopher"] = 3200, ["Infobox_planet"] = 4700, ["Infobox_play"] = 3800, ["Infobox_political_party"] = 14000, ["Infobox_power_station"] = 3000, ["Infobox_prepared_food"] = 3200, ["Infobox_professional_wrestler"] = 4200, ["Infobox_professional_wrestling_event"] = 2600, ["Infobox_protected_area"] = 14000, ["Infobox_protein_family"] = 2100, ["Infobox_publisher"] = 2400, ["Infobox_racehorse"] = 5500, ["Infobox_racing_driver"] = 3600, ["Infobox_radio_station"] = 22000, ["Infobox_rail"] = 2900, ["Infobox_rail_line"] = 7100, ["Infobox_rail_line/tracking"] = 7100, ["Infobox_rail_service"] = 2900, ["Infobox_rail_service/doc"] = 2900, ["Infobox_reality_competition_season"] = 3300, ["Infobox_record_label"] = 4000, ["Infobox_recurring_event"] = 6200, ["Infobox_religious_biography"] = 4900, ["Infobox_religious_building"] = 12000, ["Infobox_religious_building/color"] = 16000, ["Infobox_restaurant"] = 2300, ["Infobox_river"] = 30000, ["Infobox_river/calcunit"] = 30000, ["Infobox_river/discharge"] = 30000, ["Infobox_river/row-style"] = 30000, ["Infobox_river/source"] = 30000, ["Infobox_road"] = 24000, ["Infobox_road/meta/mask/category"] = 23000, ["Infobox_road/meta/mask/country"] = 24000, ["Infobox_road/styles.css"] = 25000, ["Infobox_road_small"] = 2300, ["Infobox_rockunit"] = 6400, ["Infobox_royalty"] = 21000, ["Infobox_royalty/short_description"] = 13000, ["Infobox_rugby_biography"] = 15000, ["Infobox_rugby_biography/correct_date"] = 15000, ["Infobox_rugby_biography/depcheck"] = 6800, ["Infobox_rugby_league_biography"] = 9900, ["Infobox_rugby_league_biography/PLAYER"] = 9800, ["Infobox_rugby_team"] = 2600, ["Infobox_sailboat_specifications"] = 2200, ["Infobox_saint"] = 4900, ["Infobox_school"] = 38000, ["Infobox_school/short_description"] = 38000, ["Infobox_school_district"] = 5600, ["Infobox_school_district/styles.css"] = 5600, ["Infobox_scientist"] = 47000, ["Infobox_service_record"] = 2500, ["Infobox_settlement"] = 555000, ["Infobox_settlement/areadisp"] = 232000, ["Infobox_settlement/columns"] = 92000, ["Infobox_settlement/columns/styles.css"] = 92000, ["Infobox_settlement/densdisp"] = 427000, ["Infobox_settlement/impus"] = 80000, ["Infobox_settlement/lengthdisp"] = 167000, ["Infobox_settlement/link"] = 92000, ["Infobox_settlement/metric"] = 206000, ["Infobox_settlement/pref"] = 287000, ["Infobox_settlement/styles.css"] = 555000, ["Infobox_ship_begin"] = 40000, ["Infobox_ship_career"] = 37000, ["Infobox_ship_characteristics"] = 40000, ["Infobox_ship_class_overview"] = 4100, ["Infobox_ship_image"] = 40000, ["Infobox_shopping_mall"] = 3400, ["Infobox_short_story"] = 2300, ["Infobox_skier"] = 2500, ["Infobox_soap_character"] = 2900, ["Infobox_software"] = 14000, ["Infobox_software/simple"] = 14000, ["Infobox_song"] = 74000, ["Infobox_song/color"] = 74000, ["Infobox_song/link"] = 74000, ["Infobox_spaceflight"] = 3500, ["Infobox_spaceflight/styles.css"] = 3500, ["Infobox_sport_event"] = 2000, ["Infobox_sports_competition_event"] = 16000, ["Infobox_sports_competition_event/medalrow"] = 11000, ["Infobox_sports_league"] = 4900, ["Infobox_sports_season"] = 5200, ["Infobox_sports_team"] = 2200, ["Infobox_sportsperson"] = 105000, ["Infobox_stadium"] = 3600, ["Infobox_station"] = 54000, ["Infobox_station/doc"] = 54000, ["Infobox_station/services"] = 54000, ["Infobox_station/styles.css"] = 54000, ["Infobox_street"] = 3300, ["Infobox_swimmer"] = 9300, ["Infobox_television"] = 56000, ["Infobox_television/Short_description"] = 54000, ["Infobox_television_channel"] = 6200, ["Infobox_television_episode"] = 11000, ["Infobox_television_episode/styles.css"] = 11000, ["Infobox_television_season"] = 9200, ["Infobox_television_station"] = 3700, ["Infobox_tennis_biography"] = 10000, ["Infobox_tennis_event"] = 2400, ["Infobox_tennis_tournament_event"] = 18000, ["Infobox_tennis_tournament_year"] = 9000, ["Infobox_tennis_tournament_year/color"] = 27000, ["Infobox_tennis_tournament_year/footer"] = 27000, ["Infobox_train"] = 2200, ["Infobox_tropical_cyclone"] = 2300, ["Infobox_union"] = 2200, ["Infobox_university"] = 26000, ["Infobox_user"] = 2600, ["Infobox_venue"] = 18000, ["Infobox_video_game"] = 27000, ["Infobox_video_game/styles.css"] = 27000, ["Infobox_volleyball_biography"] = 5200, ["Infobox_weapon"] = 7200, ["Infobox_website"] = 7700, ["Infobox_writer"] = 37000, ["Information"] = 104000, ["Information/styles.css"] = 104000, ["Inprogress"] = 2300, ["Input_link"] = 32000, ["Instagram"] = 10000, ["Interlanguage_link"] = 147000, ["Interlanguage_link_multi"] = 20000, ["Internet_Archive_author"] = 18000, ["Internet_Archive_film"] = 2500, ["Intitle"] = 11000, ["Invalid_SVG"] = 3800, ["Invalid_SVG/styles.css"] = 3800, ["Ipsock"] = 7800, ["Iptalk"] = 20000, ["IranCensus2006"] = 51000, ["IranNCSGN"] = 3200, ["Iran_Census_2006"] = 51000, ["Irc"] = 2100, ["Irish_place_name"] = 2600, ["IsIPAddress"] = 40000, ["IsValidPageName"] = 135000, ["Is_country_in_Central_America"] = 13000, ["Is_country_in_the_Caribbean"] = 14000, ["Is_interwiki_link"] = 6000, ["Is_italic_taxon"] = 461000, ["Is_redirect"] = 25000, ["Isbn"] = 7000, ["Isfdb_name"] = 4000, ["Isfdb_title"] = 4500, ["Isnumeric"] = 201000, ["Iso2continent"] = 33000, ["Iso2country"] = 23000, ["Iso2country/article"] = 22000, ["Iso2country/data"] = 23000, ["Iso2nationality"] = 218000, ["Issubst"] = 71000, ["Isu_name"] = 2300, ["Italic_dab2"] = 5100, ["Italic_title"] = 285000, ["Italic_title_prefixed"] = 8600, ["Italics_colon"] = 3400, ["Italictitle"] = 4400, ["Ivm"] = 5700, ["Ivm/styles.css"] = 5700, ["Ivmbox"] = 121000, ["Ivory_messagebox"] = 136000, ["Module:I18n/complex_date"] = 65000, ["Module:IP"] = 128000, ["Module:IPA_symbol"] = 4500, ["Module:IPA_symbol/data"] = 4500, ["Module:IPAc-en"] = 47000, ["Module:IPAc-en/data"] = 47000, ["Module:IPAc-en/phonemes"] = 47000, ["Module:IPAc-en/pronunciation"] = 47000, ["Module:IPAddress"] = 187000, ["Module:ISO_3166"] = 995000, ["Module:ISO_3166/data/AT"] = 2500, ["Module:ISO_3166/data/BA"] = 3400, ["Module:ISO_3166/data/CA"] = 2600, ["Module:ISO_3166/data/CN"] = 2100, ["Module:ISO_3166/data/DE"] = 14000, ["Module:ISO_3166/data/ES"] = 3600, ["Module:ISO_3166/data/FR"] = 38000, ["Module:ISO_3166/data/GB"] = 6300, ["Module:ISO_3166/data/GR"] = 3100, ["Module:ISO_3166/data/IN"] = 28000, ["Module:ISO_3166/data/IR"] = 2700, ["Module:ISO_3166/data/National"] = 995000, ["Module:ISO_3166/data/PL"] = 3100, ["Module:ISO_3166/data/RS"] = 3200, ["Module:ISO_3166/data/RU"] = 24000, ["Module:ISO_3166/data/US"] = 83000, ["Module:ISO_639_name"] = 14000, ["Module:ISOdate"] = 65000, ["Module:Icon"] = 566000, ["Module:Icon/data"] = 566000, ["Module:If_empty"] = 2950000, ["Module:If_in_page"] = 8200, ["Module:If_preview"] = 469000, ["Module:If_preview/configuration"] = 469000, ["Module:If_preview/styles.css"] = 469000, ["Module:Import_style"] = 10000, ["Module:In_lang"] = 350000, ["Module:Indent"] = 4200, ["Module:Infobox"] = 4020000, ["Module:Infobox/dates"] = 65000, ["Module:Infobox/styles.css"] = 4280000, ["Module:Infobox3cols"] = 292000, ["Module:InfoboxImage"] = 4320000, ["Module:Infobox_body_of_water_tracking"] = 17000, ["Module:Infobox_cyclist_tracking"] = 16000, ["Module:Infobox_gene"] = 13000, ["Module:Infobox_mapframe"] = 377000, ["Module:Infobox_military_conflict"] = 21000, ["Module:Infobox_military_conflict/styles.css"] = 21000, ["Module:Infobox_multi-lingual_name"] = 20000, ["Module:Infobox_multi-lingual_name/data"] = 20000, ["Module:Infobox_power_station"] = 3000, ["Module:Infobox_road"] = 25000, ["Module:Infobox_road/browselinks"] = 25000, ["Module:Infobox_road/errors"] = 24000, ["Module:Infobox_road/length"] = 25000, ["Module:Infobox_road/locations"] = 24000, ["Module:Infobox_road/map"] = 24000, ["Module:Infobox_road/route"] = 25000, ["Module:Infobox_road/sections"] = 24000, ["Module:Infobox_television"] = 56000, ["Module:Infobox_television_disambiguation_check"] = 62000, ["Module:Infobox_television_episode"] = 11000, ["Module:Infobox_television_season_disambiguation_check"] = 8700, ["Module:Infobox_television_season_name"] = 9200, ["Module:Internet_Archive"] = 18000, ["Module:IrelandByCountyCatNav"] = 2500, ["Module:Is_infobox_in_lead"] = 374000, ["Module:Is_instance"] = 8100, ["Module:Italic_title"] = 1090000, ["Module:Italic_title2"] = 5100, } 1b886d1f13737ca27de8ca4f5bc08cf3da282527 MediaWiki:Common.css 8 4 423 207 2023-03-27T12:21:21Z 17ademoladav 2 css text/css /* * This is the CSS common to all desktop skins on en.Wikipedia. * Styling inside .mw-parser-output should generally use TemplateStyles. */ /* Reset italic styling set by user agent */ cite, dfn { font-style: inherit; } /* Straight quote marks for <q> */ q { quotes: '"' '"' "'" "'"; } /* Avoid collision of blockquote with floating elements by swapping margin and padding */ blockquote { overflow: hidden; margin: 1em 0; padding: 0 40px; } /* Consistent size for <small>, <sub> and <sup> */ small { font-size: 85%; } .mw-body-content sub, .mw-body-content sup { font-size: 80%; } /* Same spacing for indented and unindented paragraphs on talk pages */ .ns-talk .mw-body-content dd { margin-top: 0.4em; margin-bottom: 0.4em; } /* Reduce page jumps by hiding collapsed/dismissed content */ .client-js .mw-special-Watchlist #watchlist-message, .client-js .collapsible:not( .mw-made-collapsible).collapsed > tbody > tr:not(:first-child), /* Avoid FOUC/reflows on collapsed elements. */ /* This copies MediaWiki's solution for T42812 to apply to innercollapse/outercollapse (T325115). */ /* TODO: Use :is() selector at some reasonable future when support is good for Most Clients */ /* Reference: https://gerrit.wikimedia.org/g/mediawiki/core/+/ecda06cb2aef55b77c4b4d7ecda492d634419ead/resources/src/jquery/jquery.makeCollapsible.styles.less#75 */ .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) > p, .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) > table, .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) > thead + tbody, .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) tr:not( :first-child ), .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) .mw-collapsible-content, /* Hide charinsert base for those not using the gadget */ #editpage-specialchars { display: none; } /* Make the list of references smaller * Keep in sync with Template:Refbegin/styles.css * And Template:Reflist/styles.css */ ol.references { font-size: 90%; margin-bottom: 0.5em; } /* Cite customizations for Parsoid * Once everything uses the one true parser these are just customizations */ span[ rel="mw:referencedBy" ] { counter-reset: mw-ref-linkback 0; } span[ rel='mw:referencedBy' ] > a::before { content: counter( mw-ref-linkback, lower-alpha ); font-size: 80%; font-weight: bold; font-style: italic; } a[ rel="mw:referencedBy" ]::before { font-weight: bold; content: "^"; } span[ rel="mw:referencedBy" ]::before { content: "^ "; } .mw-ref > a[data-mw-group=lower-alpha]::after { content: '[' counter( mw-Ref, lower-alpha ) ']'; } .mw-ref > a[data-mw-group=upper-alpha]::after { content: '[' counter( mw-Ref, upper-alpha ) ']'; } .mw-ref > a[data-mw-group=decimal]::after { content: '[' counter( mw-Ref, decimal ) ']'; } .mw-ref > a[data-mw-group=lower-roman]::after { content: '[' counter( mw-Ref, lower-roman ) ']'; } .mw-ref > a[data-mw-group=upper-roman]::after { content: '[' counter( mw-Ref, upper-roman ) ']'; } .mw-ref > a[data-mw-group=lower-greek]::after { content: '[' counter( mw-Ref, lower-greek ) ']'; } /* Styling for jQuery makeCollapsible, matching that of collapseButton */ .mw-parser-output .mw-collapsible-toggle:not(.mw-ui-button) { font-weight: normal; padding-right: 0.2em; padding-left: 0.2em; } .mw-collapsible-leftside-toggle .mw-collapsible-toggle { /* @noflip */ float: left; } /* Lists in wikitable data cells are always left-aligned */ .wikitable td ul, .wikitable td ol, .wikitable td dl { /* @noflip */ text-align: left; } /* Change the external link icon to a PDF icon for all PDF files */ .mw-parser-output a[href$=".pdf"].external, .mw-parser-output a[href*=".pdf?"].external, .mw-parser-output a[href*=".pdf#"].external, .mw-parser-output a[href$=".PDF"].external, .mw-parser-output a[href*=".PDF?"].external, .mw-parser-output a[href*=".PDF#"].external { background: url("//upload.wikimedia.org/wikipedia/commons/4/4d/Icon_pdf_file.png") no-repeat right; /* @noflip */ padding: 8px 18px 8px 0; } /* System messages styled similarly to fmbox */ div.mw-warning-with-logexcerpt, div.mw-lag-warn-high, div.mw-cascadeprotectedwarning, div#mw-protect-cascadeon, div.titleblacklist-warning { clear: both; margin: 0.2em 0; border: 1px solid #bb7070; background-color: #ffdbdb; padding: 0.25em 0.9em; box-sizing: border-box; } /* default colors for partial block message */ .mw-contributions-blocked-notice-partial .mw-warning-with-logexcerpt { border-color: #fc3; background-color: #fef6e7; } /* Increase the height of the image upload box */ #wpUploadDescription { height: 13em; } /* Minimum thumb width */ figure[typeof~='mw:File/Thumb'], figure[typeof~='mw:File/Frame'], .thumbinner { min-width: 100px; } /* Prevent floating boxes from overlapping any category listings, file histories, edit previews, and edit [Show changes] views. */ #mw-subcategories, #mw-pages, #mw-category-media, #filehistory, #wikiPreview, #wikiDiff { clear: both; } /* Styling for tags in changes pages */ .mw-tag-markers { font-style: italic; font-size: 90%; } /* Hide stuff meant for accounts with special permissions. Made visible again in [[MediaWiki:Group-checkuser.css]], [[MediaWiki:Group-sysop.css]], [[MediaWiki:Group-abusefilter.css]], [[MediaWiki:Group-abusefilter-helper.css]], [[MediaWiki:Group-patroller.css]], [[MediaWiki:Group-templateeditor.css]], [[MediaWiki:Group-extendedmover.css]], [[MediaWiki:Group-extendedconfirmed.css]], and [[Mediawiki:Group-autoconfirmed.css]]. */ .checkuser-show, .sysop-show, .abusefilter-show, .abusefilter-helper-show, .patroller-show, .templateeditor-show, .extendedmover-show, .extendedconfirmed-show, .autoconfirmed-show, .user-show { display: none; } /* Hide the redlink generated by {{Editnotice}}, this overrides the ".sysop-show { display: none; }" above that applies to the same link as well. See [[phab:T45013]] Hide the images in editnotices to keep them readable in VE view. Long term, editnotices should become a core feature so that they can be designed responsive. */ .ve-ui-mwNoticesPopupTool-item .editnotice-redlink, .ve-ui-mwNoticesPopupTool-item .mbox-image, .ve-ui-mwNoticesPopupTool-item .mbox-imageright { display: none !important; } /* Remove bullets when there are multiple edit page warnings */ ul.permissions-errors { margin: 0; } ul.permissions-errors > li { list-style: none; } /* larger inline math */ span.mwe-math-mathml-inline { font-size: 118%; } /* Make <math display="block"> be left aligned with one space indent for * compatibility with style conventions */ .mwe-math-fallback-image-display, .mwe-math-mathml-display { margin-left: 1.6em !important; margin-top: 0.6em; margin-bottom: 0.6em; } .mwe-math-mathml-display math { display: inline; } @media screen { /* Gallery styles background changes are restricted to screen view. In printing we should avoid applying backgrounds. */ /* The backgrounds for galleries. */ #content .gallerybox div.thumb { /* Light gray padding */ background-color: #f8f9fa; } /* Put a chequered background behind images, only visible if they have transparency. '.filehistory a img' and '#file img:hover' are handled by MediaWiki core (as of 1.19) */ .gallerybox .thumb img { background: #fff url(//upload.wikimedia.org/wikipedia/commons/5/5d/Checker-16x16.png) repeat; } /* But not on articles, user pages, or portals. */ .ns-0 .gallerybox .thumb img, .ns-2 .gallerybox .thumb img, .ns-100 .gallerybox .thumb img { background-image: none; } /* Display "From Wikipedia, the free encyclopedia" in skins that support it, do not apply to print mode */ #siteSub { display: block; } } /* Hide FlaggedRevs notice UI when there are no pending changes */ .flaggedrevs_draft_synced, .flaggedrevs_stable_synced, /* "Temporary" to remove links in sidebar T255381 */ #t-upload, /* Hide broken download box on Special:Book pending T285400 */ .mw-special-Book #coll-downloadbox { display: none; } /* * BELOW HERE THERE BE SOONTOBE TEMPLATESTYLES THINGS; * SEE [[MediaWiki talk:Common.css/to do]] */ /* Infobox template style */ .infobox { border: 1px solid #a2a9b1; border-spacing: 3px; background-color: #f8f9fa; color: black; /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; font-size: 88%; line-height: 1.5em; width: 22em; } .infobox-header, .infobox-label, .infobox-above, .infobox-full-data, .infobox-data, .infobox-below, .infobox-subheader, .infobox-image, .infobox-navbar, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox th, .infobox td { vertical-align: top; } .infobox-label, .infobox-data, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox th, .infobox td { /* @noflip */ text-align: left; } /* Remove .infobox when element selectors above are removed */ .infobox .infobox-above, .infobox .infobox-title, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox caption { font-size: 125%; font-weight: bold; text-align: center; } .infobox-title, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox caption { padding: 0.2em; } /* Remove .infobox when element selectors above are removed */ .infobox .infobox-header, .infobox .infobox-subheader, .infobox .infobox-image, .infobox .infobox-full-data, .infobox .infobox-below { text-align: center; } /* Remove .infobox when element selectors above are removed */ .infobox .infobox-navbar { /* @noflip */ text-align: right; } /* Normal font styling for wikitable row headers with scope="row" tag */ .wikitable.plainrowheaders th[scope=row], .wikitable.plainrowheaders th[scope=rowgroup] { font-weight: normal; /* @noflip */ text-align: left; } /* Remove underlines from certain links */ .nounderlines a, .IPA a:link, .IPA a:visited { text-decoration: none !important; } /* Prevent line breaks in silly places where desired (nowrap) and links when we don't want them to (nowraplinks a) */ .nowrap, .nowraplinks a { white-space: nowrap; } /* But allow wrapping where desired: */ .wrap, .wraplinks a { white-space: normal; } /* texhtml class for inline math (based on generic times-serif class) */ span.texhtml { font-family: "Nimbus Roman No9 L", "Times New Roman", Times, serif; font-size: 118%; line-height: 1; white-space: nowrap; /* Force tabular and lining display for texhtml */ -webkit-font-feature-settings: "lnum", "tnum", "kern" 0; font-feature-settings: "lnum", "tnum", "kern" 0; font-variant-numeric: lining-nums tabular-nums; font-kerning: none; } span.texhtml span.texhtml { font-size: 100%; } @media screen { .nochecker .gallerybox .thumb img { background-image: none; } } /* Put anything you mean to be a sitewide addition above the TemplateStyles * comment above. */ e6550f05121679ab575b4a40908651fd7c310c46 434 423 2023-03-27T13:03:58Z 17ademoladav 2 css text/css /* * This is the CSS common to all desktop skins on en.Wikipedia. * Styling inside .mw-parser-output should generally use TemplateStyles. */ /* Reset italic styling set by user agent */ /* Three boxes layout */ .three-boxes-container { display: flex; justify-content: space-around; flex-wrap: wrap; margin: 1em 0; } .three-boxes-box { background-color: #f8f9fa; border: 1px solid #a2a9b1; border-radius: 4px; width: 30%; margin: 1em 0; padding: 1em; box-sizing: border-box; } @media screen and (max-width: 768px) { .three-boxes-box { width: 100%; } } cite, dfn { font-style: inherit; } /* Straight quote marks for <q> */ q { quotes: '"' '"' "'" "'"; } /* Avoid collision of blockquote with floating elements by swapping margin and padding */ blockquote { overflow: hidden; margin: 1em 0; padding: 0 40px; } /* Consistent size for <small>, <sub> and <sup> */ small { font-size: 85%; } .mw-body-content sub, .mw-body-content sup { font-size: 80%; } /* Same spacing for indented and unindented paragraphs on talk pages */ .ns-talk .mw-body-content dd { margin-top: 0.4em; margin-bottom: 0.4em; } /* Reduce page jumps by hiding collapsed/dismissed content */ .client-js .mw-special-Watchlist #watchlist-message, .client-js .collapsible:not( .mw-made-collapsible).collapsed > tbody > tr:not(:first-child), /* Avoid FOUC/reflows on collapsed elements. */ /* This copies MediaWiki's solution for T42812 to apply to innercollapse/outercollapse (T325115). */ /* TODO: Use :is() selector at some reasonable future when support is good for Most Clients */ /* Reference: https://gerrit.wikimedia.org/g/mediawiki/core/+/ecda06cb2aef55b77c4b4d7ecda492d634419ead/resources/src/jquery/jquery.makeCollapsible.styles.less#75 */ .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) > p, .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) > table, .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) > thead + tbody, .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) tr:not( :first-child ), .client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) .mw-collapsible-content, /* Hide charinsert base for those not using the gadget */ #editpage-specialchars { display: none; } /* Make the list of references smaller * Keep in sync with Template:Refbegin/styles.css * And Template:Reflist/styles.css */ ol.references { font-size: 90%; margin-bottom: 0.5em; } /* Cite customizations for Parsoid * Once everything uses the one true parser these are just customizations */ span[ rel="mw:referencedBy" ] { counter-reset: mw-ref-linkback 0; } span[ rel='mw:referencedBy' ] > a::before { content: counter( mw-ref-linkback, lower-alpha ); font-size: 80%; font-weight: bold; font-style: italic; } a[ rel="mw:referencedBy" ]::before { font-weight: bold; content: "^"; } span[ rel="mw:referencedBy" ]::before { content: "^ "; } .mw-ref > a[data-mw-group=lower-alpha]::after { content: '[' counter( mw-Ref, lower-alpha ) ']'; } .mw-ref > a[data-mw-group=upper-alpha]::after { content: '[' counter( mw-Ref, upper-alpha ) ']'; } .mw-ref > a[data-mw-group=decimal]::after { content: '[' counter( mw-Ref, decimal ) ']'; } .mw-ref > a[data-mw-group=lower-roman]::after { content: '[' counter( mw-Ref, lower-roman ) ']'; } .mw-ref > a[data-mw-group=upper-roman]::after { content: '[' counter( mw-Ref, upper-roman ) ']'; } .mw-ref > a[data-mw-group=lower-greek]::after { content: '[' counter( mw-Ref, lower-greek ) ']'; } /* Styling for jQuery makeCollapsible, matching that of collapseButton */ .mw-parser-output .mw-collapsible-toggle:not(.mw-ui-button) { font-weight: normal; padding-right: 0.2em; padding-left: 0.2em; } .mw-collapsible-leftside-toggle .mw-collapsible-toggle { /* @noflip */ float: left; } /* Lists in wikitable data cells are always left-aligned */ .wikitable td ul, .wikitable td ol, .wikitable td dl { /* @noflip */ text-align: left; } /* Change the external link icon to a PDF icon for all PDF files */ .mw-parser-output a[href$=".pdf"].external, .mw-parser-output a[href*=".pdf?"].external, .mw-parser-output a[href*=".pdf#"].external, .mw-parser-output a[href$=".PDF"].external, .mw-parser-output a[href*=".PDF?"].external, .mw-parser-output a[href*=".PDF#"].external { background: url("//upload.wikimedia.org/wikipedia/commons/4/4d/Icon_pdf_file.png") no-repeat right; /* @noflip */ padding: 8px 18px 8px 0; } /* System messages styled similarly to fmbox */ div.mw-warning-with-logexcerpt, div.mw-lag-warn-high, div.mw-cascadeprotectedwarning, div#mw-protect-cascadeon, div.titleblacklist-warning { clear: both; margin: 0.2em 0; border: 1px solid #bb7070; background-color: #ffdbdb; padding: 0.25em 0.9em; box-sizing: border-box; } /* default colors for partial block message */ .mw-contributions-blocked-notice-partial .mw-warning-with-logexcerpt { border-color: #fc3; background-color: #fef6e7; } /* Increase the height of the image upload box */ #wpUploadDescription { height: 13em; } /* Minimum thumb width */ figure[typeof~='mw:File/Thumb'], figure[typeof~='mw:File/Frame'], .thumbinner { min-width: 100px; } /* Prevent floating boxes from overlapping any category listings, file histories, edit previews, and edit [Show changes] views. */ #mw-subcategories, #mw-pages, #mw-category-media, #filehistory, #wikiPreview, #wikiDiff { clear: both; } /* Styling for tags in changes pages */ .mw-tag-markers { font-style: italic; font-size: 90%; } /* Hide stuff meant for accounts with special permissions. Made visible again in [[MediaWiki:Group-checkuser.css]], [[MediaWiki:Group-sysop.css]], [[MediaWiki:Group-abusefilter.css]], [[MediaWiki:Group-abusefilter-helper.css]], [[MediaWiki:Group-patroller.css]], [[MediaWiki:Group-templateeditor.css]], [[MediaWiki:Group-extendedmover.css]], [[MediaWiki:Group-extendedconfirmed.css]], and [[Mediawiki:Group-autoconfirmed.css]]. */ .checkuser-show, .sysop-show, .abusefilter-show, .abusefilter-helper-show, .patroller-show, .templateeditor-show, .extendedmover-show, .extendedconfirmed-show, .autoconfirmed-show, .user-show { display: none; } /* Hide the redlink generated by {{Editnotice}}, this overrides the ".sysop-show { display: none; }" above that applies to the same link as well. See [[phab:T45013]] Hide the images in editnotices to keep them readable in VE view. Long term, editnotices should become a core feature so that they can be designed responsive. */ .ve-ui-mwNoticesPopupTool-item .editnotice-redlink, .ve-ui-mwNoticesPopupTool-item .mbox-image, .ve-ui-mwNoticesPopupTool-item .mbox-imageright { display: none !important; } /* Remove bullets when there are multiple edit page warnings */ ul.permissions-errors { margin: 0; } ul.permissions-errors > li { list-style: none; } /* larger inline math */ span.mwe-math-mathml-inline { font-size: 118%; } /* Make <math display="block"> be left aligned with one space indent for * compatibility with style conventions */ .mwe-math-fallback-image-display, .mwe-math-mathml-display { margin-left: 1.6em !important; margin-top: 0.6em; margin-bottom: 0.6em; } .mwe-math-mathml-display math { display: inline; } @media screen { /* Gallery styles background changes are restricted to screen view. In printing we should avoid applying backgrounds. */ /* The backgrounds for galleries. */ #content .gallerybox div.thumb { /* Light gray padding */ background-color: #f8f9fa; } /* Put a chequered background behind images, only visible if they have transparency. '.filehistory a img' and '#file img:hover' are handled by MediaWiki core (as of 1.19) */ .gallerybox .thumb img { background: #fff url(//upload.wikimedia.org/wikipedia/commons/5/5d/Checker-16x16.png) repeat; } /* But not on articles, user pages, or portals. */ .ns-0 .gallerybox .thumb img, .ns-2 .gallerybox .thumb img, .ns-100 .gallerybox .thumb img { background-image: none; } /* Display "From Wikipedia, the free encyclopedia" in skins that support it, do not apply to print mode */ #siteSub { display: block; } } /* Hide FlaggedRevs notice UI when there are no pending changes */ .flaggedrevs_draft_synced, .flaggedrevs_stable_synced, /* "Temporary" to remove links in sidebar T255381 */ #t-upload, /* Hide broken download box on Special:Book pending T285400 */ .mw-special-Book #coll-downloadbox { display: none; } /* * BELOW HERE THERE BE SOONTOBE TEMPLATESTYLES THINGS; * SEE [[MediaWiki talk:Common.css/to do]] */ /* Infobox template style */ .infobox { border: 1px solid #a2a9b1; border-spacing: 3px; background-color: #f8f9fa; color: black; /* @noflip */ margin: 0.5em 0 0.5em 1em; padding: 0.2em; /* @noflip */ float: right; /* @noflip */ clear: right; font-size: 88%; line-height: 1.5em; width: 22em; } .infobox-header, .infobox-label, .infobox-above, .infobox-full-data, .infobox-data, .infobox-below, .infobox-subheader, .infobox-image, .infobox-navbar, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox th, .infobox td { vertical-align: top; } .infobox-label, .infobox-data, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox th, .infobox td { /* @noflip */ text-align: left; } /* Remove .infobox when element selectors above are removed */ .infobox .infobox-above, .infobox .infobox-title, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox caption { font-size: 125%; font-weight: bold; text-align: center; } .infobox-title, /* Remove element selector when every .infobox thing is using the standard module/templates */ .infobox caption { padding: 0.2em; } /* Remove .infobox when element selectors above are removed */ .infobox .infobox-header, .infobox .infobox-subheader, .infobox .infobox-image, .infobox .infobox-full-data, .infobox .infobox-below { text-align: center; } /* Remove .infobox when element selectors above are removed */ .infobox .infobox-navbar { /* @noflip */ text-align: right; } /* Normal font styling for wikitable row headers with scope="row" tag */ .wikitable.plainrowheaders th[scope=row], .wikitable.plainrowheaders th[scope=rowgroup] { font-weight: normal; /* @noflip */ text-align: left; } /* Remove underlines from certain links */ .nounderlines a, .IPA a:link, .IPA a:visited { text-decoration: none !important; } /* Prevent line breaks in silly places where desired (nowrap) and links when we don't want them to (nowraplinks a) */ .nowrap, .nowraplinks a { white-space: nowrap; } /* But allow wrapping where desired: */ .wrap, .wraplinks a { white-space: normal; } /* texhtml class for inline math (based on generic times-serif class) */ span.texhtml { font-family: "Nimbus Roman No9 L", "Times New Roman", Times, serif; font-size: 118%; line-height: 1; white-space: nowrap; /* Force tabular and lining display for texhtml */ -webkit-font-feature-settings: "lnum", "tnum", "kern" 0; font-feature-settings: "lnum", "tnum", "kern" 0; font-variant-numeric: lining-nums tabular-nums; font-kerning: none; } span.texhtml span.texhtml { font-size: 100%; } @media screen { .nochecker .gallerybox .thumb img { background-image: none; } } /* Put anything you mean to be a sitewide addition above the TemplateStyles * comment above. */ 9cfcae6b8ab4c25896f1dce3b70135271248e643 Module:Documentation/styles.css 828 45 424 182 2023-03-27T12:28:40Z 17ademoladav 2 17ademoladav changed the content model of the page [[Module:Documentation/styles.css]] from "plain text" to "Sanitized CSS" sanitized-css text/css /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } ce0e629c92e3d825ab9fd927fe6cc37d9117b6cb Module:Message box/ombox.css 828 99 425 253 2023-03-27T12:29:13Z 17ademoladav 2 17ademoladav changed the content model of the page [[Module:Message box/ombox.css]] from "plain text" to "Sanitized CSS" sanitized-css text/css /* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ombox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } 8fe3df4bb607e699eab2dbd23bd4a1a446391002 Module:Infobox/styles.css 828 51 426 98 2023-03-27T12:31:01Z 17ademoladav 2 17ademoladav changed the content model of the page [[Module:Infobox/styles.css]] from "plain text" to "Sanitized CSS" sanitized-css text/css /* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; } .infobox-3cols-child { margin: auto; } .infobox .navbar { font-size: 100%; } /* T281642 */ body.skin-minerva .infobox-header, body.skin-minerva .infobox-subheader, body.skin-minerva .infobox-above, body.skin-minerva .infobox-title, body.skin-minerva .infobox-image, body.skin-minerva .infobox-full-data, body.skin-minerva .infobox-below { text-align: center; } e8de6d96f4fde53afc4a6b0fed534405ab59b0a7 File:Los.png 6 174 427 2023-03-27T12:41:40Z 17ademoladav 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 WA Resolution 0001 (2022) 0 72 428 162 2023-03-27T12:53:31Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislation |short_title = WA/RES/001: Activity, Economy Changes and Events |legislature = World Assembly |image = File:Los.png |imagesize = 180px |image_upright = |imagealt = |caption = |citation = WA/RES/0001 |enacted_by = World Assembly |date_enacted = 23 April 2022 |administered_by = League of Servers Secretariat |summary = The World Assembly, recognizing the inactivity within the League of Servers, has enacted a resolution to revitalize the community through the establishment of a lottery employment system, creation of new lottery roles, modification of League Credits collection methods, adjustments to current product pricing, introduction of new products, and facilitating exchange of League Credits with member-servers' currencies. This resolution aims to boost engagement and participation within the League of Servers. |keywords = |status = In Force }} The World Assembly, including the President, the Vice Presidents and all delegates, ''Realizing'' that the League of Servers became very inactive, ''Hereby enacts the followings:'' '''Establishment''' of a new Lottery employment, '''Establishment''' of new Lottery roles for employees, '''Modifying''' current ways and establishing new ways to collect League Credits, '''Modifying''' current prices on current products which can be bought with League Credits, '''Making''' new products which can be bought with League Credits, '''Making''' League Credits exchangable to all member-servers’ own currency (system will be finished later) And stays resolved on the same. 238b49908ca150b81765352e3ed47cbf90063c0c 429 428 2023-03-27T12:59:16Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislation |short_title = WA/RES/001: Activity, Economy Changes and Events |legislature = World Assembly |image = File:Los.png |imagesize = 180px |image_upright = |imagealt = |caption = |citation = WA/RES/0001 |enacted_by = World Assembly |date_enacted = 23 April 2022 |administered_by = League of Servers Secretariat |summary = The World Assembly, recognizing the inactivity within the League of Servers, has enacted a resolution to revitalize the community through the establishment of a lottery employment system, creation of new lottery roles, modification of League Credits collection methods, adjustments to current product pricing, introduction of new products, and facilitating exchange of League Credits with member-servers' currencies. This resolution aims to boost engagement and participation within the League of Servers. |keywords = |status = In Force }} '''The World Assembly, including the President, the Vice Presidents and all delegates,''' ''Realizing'' that the League of Servers became very inactive, ''Hereby enacts the followings:'' '''Establishment''' of a new Lottery employment, '''Establishment''' of new Lottery roles for employees, '''Modifying''' current ways and establishing new ways to collect League Credits, '''Modifying''' current prices on current products which can be bought with League Credits, '''Making''' new products which can be bought with League Credits, '''Making''' League Credits exchangable to all member-servers’ own currency (system will be finished later) And stays resolved on the same. 5104e80bd8ff9f6aaef53dbc46517f69275f40fe WA Resolution 0002 (2022) 0 73 430 164 2023-03-27T12:59:30Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislation |short_title = WA/RES/002: The Right to Inspection |legislature = World Assembly |image = File:Los.png |imagesize = 180px |image_upright = |imagealt = |caption = |citation = WA/RES/0002 |enacted_by = World Assembly |date_enacted = 23 April 2022 |administered_by = League of Servers Secretariat |summary = The World Assembly, acknowledging the threat of inactive servers hindering the inclusion of active and dynamic nations, enacts a resolution to establish the Activity Committee of the World Assembly. This committee, overseen by the President and Inspector General, will be responsible for visiting and verifying the activity of League servers. Servers must comply with League standards and welcome Activity Committee members for assessment. Non-compliant servers will be given a probationary period and may face expulsion from the League if improvements are not made. This resolution aims to maintain a high level of activity and engagement within the League of Servers. |keywords = |status = In Force }} '''The World Assembly,''' ''Recognizing'' that the threat of innactive servers preventing the entry and inclusion of active and dynamic nations from joining the League, hereby enacts the following: '''The Establishment of the Activity Committee of the World Assembly''', to be overseen by the President and the Inspector General, and with the purpose of visiting and confirming the activity of all servers of the League; '''If requested''', all servers must welcome a designated member of the Commitee so that they may certify the activity and compliance with the League standards within the Community; '''Members of the Committee''' must be Delegates from Servers which were certified as active in the past six (6) months; '''Servers that don’t comply''' with the League standards or refuse to welcome a member of the Activity Committee are to be given three (3) days to enact the necessary changes. If such doesn’t happen, the Server will be given one (1) week to change its policy, in which time they will be considered “on Probation”; '''Servers “on Probation”''' do not have voting rights nor can run for office in the League. If they are members of a Committee, their membership will be suspended. The Server reserves the right to call for the help of the Plead to Defend signatary Servers and issue emergency reports; '''If no change in policy''' is taken by a Server “on Probation” after the designated time, the Security Council may take a vote to expell the Server from the League. And stays resolved on the same. 9c4c4b6c49e8ccc05e05fff53e51ee814f91dbb7 Home 0 1 431 412 2023-03-27T13:00:25Z 17ademoladav 2 17ademoladav moved page [[Main Page]] to [[Home]] wikitext text/x-wiki <center><big><big><b> Welcome to the League of Servers Archivarius' Office </b></big></big></center> <big> '''The World Assembly''' </big> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' <big> '''The Security Council''' </big> '''<big>[[Security Council Resolutions]]</big>''' <big> '''The Court of Justice''' </big> '''<big>[[Court Cases]]</big>''' '''<big>[[Court Rulings]]</big>''' <big> '''Submit A WA Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''Resolution 0000'' preload=Archivarius:Record A Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> <big> '''Submit A SC Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''SC Resolution 0000'' preload=Archivarius:Record A SC Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> 43a7c5f6d4fc40484f7ccd2441ff51e465afb03b 433 431 2023-03-27T13:00:51Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the Library of World Assembly </b></big></big></center> <big> '''The World Assembly''' </big> '''<big>[[World Assembly Resolutions]]</big>''' '''<big>[[World Assembly Proclamations]]</big>''' <big> '''The Security Council''' </big> '''<big>[[Security Council Resolutions]]</big>''' <big> '''The Court of Justice''' </big> '''<big>[[Court Cases]]</big>''' '''<big>[[Court Rulings]]</big>''' <big> '''Submit A WA Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''Resolution 0000'' preload=Archivarius:Record A Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> <big> '''Submit A SC Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''SC Resolution 0000'' preload=Archivarius:Record A SC Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> 51c2ad7ebc37c9d09e1c8f926feac64008198d8f 435 433 2023-03-27T13:08:41Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the Library of World Assembly </b></big></big></center> <div class="three-boxes-container"> <div class="three-boxes-box"> <h2>World Assembly</h2> <p>'''<big>[[World Assembly Resolutions]]</big>'''</p> <p> '''<big>[[World Assembly Proclamations]]</big>'''</p> </div> <div class="three-boxes-box"> <h2>Security Council</h2> <p>'''<big>[[Security Council Resolutions]]</big>'''</p> </div> <div class="three-boxes-box"> <h2>Court of Justice</h2> <p>'''<big>[[Court Rulings]]</big>'''</p> </div> </div> <big> '''Submit A WA Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''Resolution 0000'' preload=Archivarius:Record A Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> <big> '''Submit A SC Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''SC Resolution 0000'' preload=Archivarius:Record A SC Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> a1b929cf5ac6c6d5e7da465c977cb16610b004dc 439 435 2023-03-27T13:17:34Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the Library of World Assembly </b></big></big></center> <div class="three-boxes-container"> <div class="three-boxes-box"> <h2>World Assembly</h2> <p>'''<big>[[The World Assembly| World Assembly Resolutions]]</big>'''</p> <p> '''<big>[[The World Assembly| World Assembly Proclamations]]</big>'''</p> </div> <div class="three-boxes-box"> <h2>Security Council</h2> <p>'''<big>[[Security Council Resolutions]]</big>'''</p> </div> <div class="three-boxes-box"> <h2>Court of Justice</h2> <p>'''<big>[[Court of Justice| Court Rulings]]</big>'''</p> </div> </div> <big> '''Submit A WA Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''Resolution 0000'' preload=Archivarius:Record A Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> <big> '''Submit A SC Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''SC Resolution 0000'' preload=Archivarius:Record A SC Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> f3cba1cf3830e0db534077b52e25ed036ddb2e74 441 439 2023-03-27T13:18:07Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the Library of World Assembly </b></big></big></center> <div class="three-boxes-container"> <div class="three-boxes-box"> <h2>World Assembly</h2> <p>'''<big>[[The World Assembly| World Assembly Resolutions]]</big>'''</p> <p> '''<big>[[The World Assembly| World Assembly Proclamations]]</big>'''</p> </div> <div class="three-boxes-box"> <h2>Security Council</h2> <p>'''<big>[[Security Council| Security Council Resolutions]]</big>'''</p> </div> <div class="three-boxes-box"> <h2>Court of Justice</h2> <p>'''<big>[[Court of Justice| Court Rulings]]</big>'''</p> </div> </div> <big> '''Submit A WA Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''Resolution 0000'' preload=Archivarius:Record A Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> <big> '''Submit A SC Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''SC Resolution 0000'' preload=Archivarius:Record A SC Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> 22779130a14c2a7fa5e973e10a18297bcd2f5fc8 Main Page 0 175 432 2023-03-27T13:00:25Z 17ademoladav 2 17ademoladav moved page [[Main Page]] to [[Home]] wikitext text/x-wiki #REDIRECT [[Home]] 3c9846fc91826543c49e08653ad8ca1614c26b9e World Assembly 0 64 436 422 2023-03-27T13:12:52Z 17ademoladav 2 17ademoladav moved page [[World Assembly Resolutions]] to [[World Assembly]] wikitext text/x-wiki {| class="wikitable" |+ Resolutions of the World Assembly as of 2022 |- ! Resolution !! Status |- | [[Resolution 0001]] || In Effect |- | [[Resolution 0002]] || In Effect |- | [[Resolution 0003]] || In Effect |- | [[Resolution 0004]] || In Effect |- | [[Resolution 0005]] || Pending |- | [[Resolution 0006]] || Pending |- | [[Resolution 0007]] || Pending |} 6ad635588b38be2246c7989725d5a4f339c8ac62 438 436 2023-03-27T13:14:38Z 17ademoladav 2 17ademoladav moved page [[World Assembly]] to [[The World Assembly]] without leaving a redirect wikitext text/x-wiki {| class="wikitable" |+ Resolutions of the World Assembly as of 2022 |- ! Resolution !! Status |- | [[Resolution 0001]] || In Effect |- | [[Resolution 0002]] || In Effect |- | [[Resolution 0003]] || In Effect |- | [[Resolution 0004]] || In Effect |- | [[Resolution 0005]] || Pending |- | [[Resolution 0006]] || Pending |- | [[Resolution 0007]] || Pending |} 6ad635588b38be2246c7989725d5a4f339c8ac62 World Assembly Resolutions 0 176 437 2023-03-27T13:12:52Z 17ademoladav 2 17ademoladav moved page [[World Assembly Resolutions]] to [[World Assembly]] wikitext text/x-wiki #REDIRECT [[World Assembly]] a53251b1a3cb4066b01a7648f869623fe919087f Security Council 0 166 440 409 2023-03-27T13:17:45Z 17ademoladav 2 17ademoladav moved page [[Security Council Resolutions]] to [[Security Council]] without leaving a redirect wikitext text/x-wiki {| class="wikitable" |+ Resolutions of the Security Council as of 2022 |- ! Resolution !! Status |- | [[SC Resolution 0001]] || In Effect |- | [[SC Resolution 0002]] || In Effect |- | [[SC Resolution 0003]] || In Effect |- | [[SC Resolution 0004]] || Pending |- | [[SC Resolution 0005]] || Pending |- | [[SC Resolution 0006]] || Pending |- | [[SC Resolution 0007]] || Pending |} 24ada0b89b7f8f0ef52ca0978945ed1c73c8f159 442 440 2023-03-27T13:28:49Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = Security Council | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = | houses = | chambers = | body = | jurisdiction = | term_limits = None | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = | leader1 = | leader1_term = | party1 = | election1 = | leader2_type = | leader2 = | party2 = | election2 = | leader2_term = | leader3_type = | leader3 = | party3 = | election3 = | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = 20 | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = 1 Month | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = 14 June 2022 | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = 12 April 2023 | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = | footnotes = }} c24189de73cbaf946b0bb8a88fd9788bb294ff27 Archivarius:Record A Resolution 0 165 443 401 2023-03-27T13:33:55Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislation |short_title = <!-- Example: WA/RES/001: Activity, Economy Changes and Events --> |legislature = World Assembly |image = File:Los.png |imagesize = 180px |image_upright = |imagealt = |caption = |citation = <!-- Example: WA/RES/0001 --> |enacted_by = World Assembly |date_enacted = <!-- Example: 23 April 2022 --> |administered_by = League of Servers Secretariat |summary = <!-- Example: The World Assembly, recognizing the inactivity within the League of Servers, has enacted a resolution to revitalize the community through the establishment of a lottery employment system, creation of new lottery roles, modification of League Credits collection methods, adjustments to current product pricing, introduction of new products, and facilitating exchange of League Credits with member-servers' currencies. This resolution aims to boost engagement and participation within the League of Servers. --> |status = <!--Pending/In Force --> }} <!-- Make sure you delete you clear all the examples and then type in your text below --> 6be3ff8e23529fde68cbd7af89ec33ec41404114 Archivarius:Record A SC Resolution 0 167 444 411 2023-03-27T13:36:15Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislation |short_title = <!-- Example: SC/RES/001: Activity, Economy Changes and Events --> |legislature = Security Council |image = File:Los.png |imagesize = 180px |image_upright = |imagealt = |caption = |citation = <!-- Example: SC/RES/0001 --> |enacted_by = Security Council |date_enacted = <!-- Example: 23 April 2022 --> |administered_by = League of Servers Secretariat |summary = <!-- Example: The Security Council's Project Maginot Resolution addresses past conflicts with The Authority in Q4 of 2020. The resolution highlights the effectiveness of the League of States (LoS) coalition forces and The Authority's defeat due to a nuclear bot breaching their defenses. The resolution proposes a collective project, "Project Maginot," to establish a defensive barrier against potential future aggression from The Authority. The project will only take place in LoS member nations with more than 100 members, requiring participating nations to ban potential nuclear bots, report discovered nuclear bots to the League, and confidentially inform the League about their nuclear programs, if applicable. --> |status = <!--Pending/In Force --> }} <!-- Make sure you delete you clear all the examples and then type in your text below --> 3bdc188b8b785abddb7c76858091ba25ab0f3d0a Module:If preview 828 177 447 446 2023-03-27T13:45:54Z 17ademoladav 2 1 revision imported Scribunto text/plain local p = {} local cfg = mw.loadData('Module:If preview/configuration') --[[ main This function returns either the first argument or second argument passed to this module, depending on whether the page is being previewed. ]] function p.main(frame) if cfg.preview then return frame.args[1] or '' else return frame.args[2] or '' end end --[[ pmain This function returns either the first argument or second argument passed to this module's parent (i.e. template using this module), depending on whether it is being previewed. ]] function p.pmain(frame) return p.main(frame:getParent()) end local function warning_text(warning) return mw.ustring.format( cfg.warning_infrastructure, cfg.templatestyles, warning ) end function p._warning(args) local warning = args[1] and args[1]:match('^%s*(.-)%s*$') or '' if warning == '' then return warning_text(cfg.missing_warning) end if not cfg.preview then return '' end return warning_text(warning) end --[[ warning This function returns a "preview warning", which is the first argument marked up with HTML and some supporting text, depending on whether the page is being previewed. disabled since we'll implement the template version in general ]] --function p.warning(frame) -- return p._warning(frame.args) --end --[[ warning, but for pass-through templates like {{preview warning}} ]] function p.pwarning(frame) return p._warning(frame:getParent().args) end return p 9a92196d0001b8016f2501aedfadcc3adcb974ef Module:Message box 828 55 449 448 2023-03-27T13:45:55Z 17ademoladav 2 1 revision imported Scribunto text/plain require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage or 'Imbox notice.png', imageSize) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) bdb0ecc9f26f26b9c0ce12a066a183ac9d4f0705 Module:If preview/configuration 828 178 453 452 2023-03-27T13:45:57Z 17ademoladav 2 1 revision imported Scribunto text/plain --[[ We perform the actual check for whether this is a preview here since preprocessing is relatively expensive. ]] local frame = mw.getCurrentFrame() local function is_preview() local revision_id = frame:preprocess('{{REVISIONID}}') -- {{REVISIONID}} is usually the empty string when previewed. -- I don't know why we're checking for nil but hey, maybe someday things -- would have broken return revision_id == nil or revision_id == '' end local function templatestyles() return frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:If preview/styles.css' } } end return { preview = is_preview(), templatestyles = templatestyles(), warning_infrastructure = '%s<div class="preview-warning"><strong>Preview warning:</strong> %s</div>', missing_warning = 'The template has no warning text. Please add a warning.' } 3edc8897c51a61b9e710b2a4d9eb657b3c2f1034 Module:If preview/styles.css 828 179 455 454 2023-03-27T13:45:58Z 17ademoladav 2 1 revision imported sanitized-css text/css /* {{pp|small=yes}} */ .preview-warning { font-style: italic; /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; color: red; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .preview-warning + link + .preview-warning { margin-top: -0.5em; } 8b79ffc4853d424a805b084de00030e04bbd573e Module:Protection banner 828 59 457 456 2023-03-27T13:45:59Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module implements {{pp-meta}} and its daughter templates such as -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. -- Initialise necessary modules. require('strict') local makeFileLink = require('Module:File link')._main local effectiveProtectionLevel = require('Module:Effective protection level')._main local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main local yesno = require('Module:Yesno') -- Lazily initialise modules and objects we don't always need. local getArgs, makeMessageBox, lang -- Set constants. local CONFIG_MODULE = 'Module:Protection banner/config' -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function makeCategoryLink(cat, sort) if cat then return string.format( '[[%s:%s|%s]]', mw.site.namespaces[14].name, cat, sort ) end end -- Validation function for the expiry and the protection date local function validateDate(dateString, dateType) if not lang then lang = mw.language.getContentLanguage() end local success, result = pcall(lang.formatDate, lang, 'U', dateString) if success then result = tonumber(result) if result then return result end end error(string.format( 'invalid %s: %s', dateType, tostring(dateString) ), 4) end local function makeFullUrl(page, query, display) return string.format( '[%s %s]', tostring(mw.uri.fullUrl(page, query)), display ) end -- Given a directed graph formatted as node -> table of direct successors, -- get a table of all nodes reachable from a given node (though always -- including the given node). local function getReachableNodes(graph, start) local toWalk, retval = {[start] = true}, {} while true do -- Can't use pairs() since we're adding and removing things as we're iterating local k = next(toWalk) -- This always gets the "first" key if k == nil then return retval end toWalk[k] = nil retval[k] = true for _,v in ipairs(graph[k]) do if not retval[v] then toWalk[v] = true end end end end -------------------------------------------------------------------------------- -- Protection class -------------------------------------------------------------------------------- local Protection = {} Protection.__index = Protection Protection.supportedActions = { edit = true, move = true, autoreview = true, upload = true } Protection.bannerConfigFields = { 'text', 'explanation', 'tooltip', 'alt', 'link', 'image' } function Protection.new(args, cfg, title) local obj = {} obj._cfg = cfg obj.title = title or mw.title.getCurrentTitle() -- Set action if not args.action then obj.action = 'edit' elseif Protection.supportedActions[args.action] then obj.action = args.action else error(string.format( 'invalid action: %s', tostring(args.action) ), 3) end -- Set level obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title) if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then -- Users need to be autoconfirmed to move pages anyway, so treat -- semi-move-protected pages as unprotected. obj.level = '*' end -- Set expiry local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title) if effectiveExpiry == 'infinity' then obj.expiry = 'indef' elseif effectiveExpiry ~= 'unknown' then obj.expiry = validateDate(effectiveExpiry, 'expiry date') end -- Set reason if args[1] then obj.reason = mw.ustring.lower(args[1]) if obj.reason:find('|') then error('reasons cannot contain the pipe character ("|")', 3) end end -- Set protection date if args.date then obj.protectionDate = validateDate(args.date, 'protection date') end -- Set banner config do obj.bannerConfig = {} local configTables = {} if cfg.banners[obj.action] then configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason] end if cfg.defaultBanners[obj.action] then configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level] configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default end configTables[#configTables + 1] = cfg.masterBanner for i, field in ipairs(Protection.bannerConfigFields) do for j, t in ipairs(configTables) do if t[field] then obj.bannerConfig[field] = t[field] break end end end end return setmetatable(obj, Protection) end function Protection:isUserScript() -- Whether the page is a user JavaScript or CSS page. local title = self.title return title.namespace == 2 and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) end function Protection:isProtected() return self.level ~= '*' end function Protection:shouldShowLock() -- Whether we should output a banner/padlock return self:isProtected() and not self:isUserScript() end -- Whether this page needs a protection category. Protection.shouldHaveProtectionCategory = Protection.shouldShowLock function Protection:isTemporary() return type(self.expiry) == 'number' end function Protection:makeProtectionCategory() if not self:shouldHaveProtectionCategory() then return '' end local cfg = self._cfg local title = self.title -- Get the expiry key fragment. local expiryFragment if self.expiry == 'indef' then expiryFragment = self.expiry elseif type(self.expiry) == 'number' then expiryFragment = 'temp' end -- Get the namespace key fragment. local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace] if not namespaceFragment and title.namespace % 2 == 1 then namespaceFragment = 'talk' end -- Define the order that key fragments are tested in. This is done with an -- array of tables containing the value to be tested, along with its -- position in the cfg.protectionCategories table. local order = { {val = expiryFragment, keypos = 1}, {val = namespaceFragment, keypos = 2}, {val = self.reason, keypos = 3}, {val = self.level, keypos = 4}, {val = self.action, keypos = 5} } --[[ -- The old protection templates used an ad-hoc protection category system, -- with some templates prioritising namespaces in their categories, and -- others prioritising the protection reason. To emulate this in this module -- we use the config table cfg.reasonsWithNamespacePriority to set the -- reasons for which namespaces have priority over protection reason. -- If we are dealing with one of those reasons, move the namespace table to -- the end of the order table, i.e. give it highest priority. If not, the -- reason should have highest priority, so move that to the end of the table -- instead. --]] table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3)) --[[ -- Define the attempt order. Inactive subtables (subtables with nil "value" -- fields) are moved to the end, where they will later be given the key -- "all". This is to cut down on the number of table lookups in -- cfg.protectionCategories, which grows exponentially with the number of -- non-nil keys. We keep track of the number of active subtables with the -- noActive parameter. --]] local noActive, attemptOrder do local active, inactive = {}, {} for i, t in ipairs(order) do if t.val then active[#active + 1] = t else inactive[#inactive + 1] = t end end noActive = #active attemptOrder = active for i, t in ipairs(inactive) do attemptOrder[#attemptOrder + 1] = t end end --[[ -- Check increasingly generic key combinations until we find a match. If a -- specific category exists for the combination of key fragments we are -- given, that match will be found first. If not, we keep trying different -- key fragment combinations until we match using the key -- "all-all-all-all-all". -- -- To generate the keys, we index the key subtables using a binary matrix -- with indexes i and j. j is only calculated up to the number of active -- subtables. For example, if there were three active subtables, the matrix -- would look like this, with 0 corresponding to the key fragment "all", and -- 1 corresponding to other key fragments. -- -- j 1 2 3 -- i -- 1 1 1 1 -- 2 0 1 1 -- 3 1 0 1 -- 4 0 0 1 -- 5 1 1 0 -- 6 0 1 0 -- 7 1 0 0 -- 8 0 0 0 -- -- Values of j higher than the number of active subtables are set -- to the string "all". -- -- A key for cfg.protectionCategories is constructed for each value of i. -- The position of the value in the key is determined by the keypos field in -- each subtable. --]] local cats = cfg.protectionCategories for i = 1, 2^noActive do local key = {} for j, t in ipairs(attemptOrder) do if j > noActive then key[t.keypos] = 'all' else local quotient = i / 2 ^ (j - 1) quotient = math.ceil(quotient) if quotient % 2 == 1 then key[t.keypos] = t.val else key[t.keypos] = 'all' end end end key = table.concat(key, '|') local attempt = cats[key] if attempt then return makeCategoryLink(attempt, title.text) end end return '' end function Protection:isIncorrect() local expiry = self.expiry return not self:shouldHaveProtectionCategory() or type(expiry) == 'number' and expiry < os.time() end function Protection:isTemplateProtectedNonTemplate() local action, namespace = self.action, self.title.namespace return self.level == 'templateeditor' and ( (action ~= 'edit' and action ~= 'move') or (namespace ~= 10 and namespace ~= 828) ) end function Protection:makeCategoryLinks() local msg = self._cfg.msg local ret = {self:makeProtectionCategory()} if self:isIncorrect() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-incorrect'], self.title.text ) end if self:isTemplateProtectedNonTemplate() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-template'], self.title.text ) end return table.concat(ret) end -------------------------------------------------------------------------------- -- Blurb class -------------------------------------------------------------------------------- local Blurb = {} Blurb.__index = Blurb Blurb.bannerTextFields = { text = true, explanation = true, tooltip = true, alt = true, link = true } function Blurb.new(protectionObj, args, cfg) return setmetatable({ _cfg = cfg, _protectionObj = protectionObj, _args = args }, Blurb) end -- Private methods -- function Blurb:_formatDate(num) -- Formats a Unix timestamp into dd Month, YYYY format. lang = lang or mw.language.getContentLanguage() local success, date = pcall( lang.formatDate, lang, self._cfg.msg['expiry-date-format'] or 'j F Y', '@' .. tostring(num) ) if success then return date end end function Blurb:_getExpandedMessage(msgKey) return self:_substituteParameters(self._cfg.msg[msgKey]) end function Blurb:_substituteParameters(msg) if not self._params then local parameterFuncs = {} parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter parameterFuncs.EDITREQUEST = self._makeEditRequestParameter parameterFuncs.EXPIRY = self._makeExpiryParameter parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter parameterFuncs.IMAGELINK = self._makeImageLinkParameter parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter parameterFuncs.PAGETYPE = self._makePagetypeParameter parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter parameterFuncs.TALKPAGE = self._makeTalkPageParameter parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter parameterFuncs.VANDAL = self._makeVandalTemplateParameter self._params = setmetatable({}, { __index = function (t, k) local param if parameterFuncs[k] then param = parameterFuncs[k](self) end param = param or '' t[k] = param return param end }) end msg = msg:gsub('${(%u+)}', self._params) return msg end function Blurb:_makeCurrentVersionParameter() -- A link to the page history or the move log, depending on the kind of -- protection. local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'move' then -- We need the move log link. return makeFullUrl( 'Special:Log', {type = 'move', page = pagename}, self:_getExpandedMessage('current-version-move-display') ) else -- We need the history link. return makeFullUrl( pagename, {action = 'history'}, self:_getExpandedMessage('current-version-edit-display') ) end end function Blurb:_makeEditRequestParameter() local mEditRequest = require('Module:Submit an edit request') local action = self._protectionObj.action local level = self._protectionObj.level -- Get the edit request type. local requestType if action == 'edit' then if level == 'autoconfirmed' then requestType = 'semi' elseif level == 'extendedconfirmed' then requestType = 'extended' elseif level == 'templateeditor' then requestType = 'template' end end requestType = requestType or 'full' -- Get the display value. local display = self:_getExpandedMessage('edit-request-display') return mEditRequest._link{type = requestType, display = display} end function Blurb:_makeExpiryParameter() local expiry = self._protectionObj.expiry if type(expiry) == 'number' then return self:_formatDate(expiry) else return expiry end end function Blurb:_makeExplanationBlurbParameter() -- Cover special cases first. if self._protectionObj.title.namespace == 8 then -- MediaWiki namespace return self:_getExpandedMessage('explanation-blurb-nounprotect') end -- Get explanation blurb table keys local action = self._protectionObj.action local level = self._protectionObj.level local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject' -- Find the message in the explanation blurb table and substitute any -- parameters. local explanations = self._cfg.explanationBlurbs local msg if explanations[action][level] and explanations[action][level][talkKey] then msg = explanations[action][level][talkKey] elseif explanations[action][level] and explanations[action][level].default then msg = explanations[action][level].default elseif explanations[action].default and explanations[action].default[talkKey] then msg = explanations[action].default[talkKey] elseif explanations[action].default and explanations[action].default.default then msg = explanations[action].default.default else error(string.format( 'could not find explanation blurb for action "%s", level "%s" and talk key "%s"', action, level, talkKey ), 8) end return self:_substituteParameters(msg) end function Blurb:_makeImageLinkParameter() local imageLinks = self._cfg.imageLinks local action = self._protectionObj.action local level = self._protectionObj.level local msg if imageLinks[action][level] then msg = imageLinks[action][level] elseif imageLinks[action].default then msg = imageLinks[action].default else msg = imageLinks.edit.default end return self:_substituteParameters(msg) end function Blurb:_makeIntroBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-blurb-expiry') else return self:_getExpandedMessage('intro-blurb-noexpiry') end end function Blurb:_makeIntroFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-fragment-expiry') else return self:_getExpandedMessage('intro-fragment-noexpiry') end end function Blurb:_makePagetypeParameter() local pagetypes = self._cfg.pagetypes return pagetypes[self._protectionObj.title.namespace] or pagetypes.default or error('no default pagetype defined', 8) end function Blurb:_makeProtectionBlurbParameter() local protectionBlurbs = self._cfg.protectionBlurbs local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionBlurbs[action][level] then msg = protectionBlurbs[action][level] elseif protectionBlurbs[action].default then msg = protectionBlurbs[action].default elseif protectionBlurbs.edit.default then msg = protectionBlurbs.edit.default else error('no protection blurb defined for protectionBlurbs.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionDateParameter() local protectionDate = self._protectionObj.protectionDate if type(protectionDate) == 'number' then return self:_formatDate(protectionDate) else return protectionDate end end function Blurb:_makeProtectionLevelParameter() local protectionLevels = self._cfg.protectionLevels local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionLevels[action][level] then msg = protectionLevels[action][level] elseif protectionLevels[action].default then msg = protectionLevels[action].default elseif protectionLevels.edit.default then msg = protectionLevels.edit.default else error('no protection level defined for protectionLevels.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionLogParameter() local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'autoreview' then -- We need the pending changes log. return makeFullUrl( 'Special:Log', {type = 'stable', page = pagename}, self:_getExpandedMessage('pc-log-display') ) else -- We need the protection log. return makeFullUrl( 'Special:Log', {type = 'protect', page = pagename}, self:_getExpandedMessage('protection-log-display') ) end end function Blurb:_makeTalkPageParameter() return string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[self._protectionObj.title.namespace].talk.name, self._protectionObj.title.text, self._args.section or 'top', self:_getExpandedMessage('talk-page-link-display') ) end function Blurb:_makeTooltipBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-blurb-expiry') else return self:_getExpandedMessage('tooltip-blurb-noexpiry') end end function Blurb:_makeTooltipFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-fragment-expiry') else return self:_getExpandedMessage('tooltip-fragment-noexpiry') end end function Blurb:_makeVandalTemplateParameter() return mw.getCurrentFrame():expandTemplate{ title="vandal-m", args={self._args.user or self._protectionObj.title.baseText} } end -- Public methods -- function Blurb:makeBannerText(key) -- Validate input. if not key or not Blurb.bannerTextFields[key] then error(string.format( '"%s" is not a valid banner config field', tostring(key) ), 2) end -- Generate the text. local msg = self._protectionObj.bannerConfig[key] if type(msg) == 'string' then return self:_substituteParameters(msg) elseif type(msg) == 'function' then msg = msg(self._protectionObj, self._args) if type(msg) ~= 'string' then error(string.format( 'bad output from banner config function with key "%s"' .. ' (expected string, got %s)', tostring(key), type(msg) ), 4) end return self:_substituteParameters(msg) end end -------------------------------------------------------------------------------- -- BannerTemplate class -------------------------------------------------------------------------------- local BannerTemplate = {} BannerTemplate.__index = BannerTemplate function BannerTemplate.new(protectionObj, cfg) local obj = {} obj._cfg = cfg -- Set the image filename. local imageFilename = protectionObj.bannerConfig.image if imageFilename then obj._imageFilename = imageFilename else -- If an image filename isn't specified explicitly in the banner config, -- generate it from the protection status and the namespace. local action = protectionObj.action local level = protectionObj.level local namespace = protectionObj.title.namespace local reason = protectionObj.reason -- Deal with special cases first. if ( namespace == 10 or namespace == 828 or reason and obj._cfg.indefImageReasons[reason] ) and action == 'edit' and level == 'sysop' and not protectionObj:isTemporary() then -- Fully protected modules and templates get the special red "indef" -- padlock. obj._imageFilename = obj._cfg.msg['image-filename-indef'] else -- Deal with regular protection types. local images = obj._cfg.images if images[action] then if images[action][level] then obj._imageFilename = images[action][level] elseif images[action].default then obj._imageFilename = images[action].default end end end end return setmetatable(obj, BannerTemplate) end function BannerTemplate:renderImage() local filename = self._imageFilename or self._cfg.msg['image-filename-default'] or 'Transparent.gif' return makeFileLink{ file = filename, size = (self.imageWidth or 20) .. 'px', alt = self._imageAlt, link = self._imageLink, caption = self.imageCaption } end -------------------------------------------------------------------------------- -- Banner class -------------------------------------------------------------------------------- local Banner = setmetatable({}, BannerTemplate) Banner.__index = Banner function Banner.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 40 obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip. obj._reasonText = blurbObj:makeBannerText('text') obj._explanationText = blurbObj:makeBannerText('explanation') obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing. return setmetatable(obj, Banner) end function Banner:__tostring() -- Renders the banner. makeMessageBox = makeMessageBox or require('Module:Message box').main local reasonText = self._reasonText or error('no reason text set', 2) local explanationText = self._explanationText local mbargs = { page = self._page, type = 'protection', image = self:renderImage(), text = string.format( "'''%s'''%s", reasonText, explanationText and '<br />' .. explanationText or '' ) } return makeMessageBox('mbox', mbargs) end -------------------------------------------------------------------------------- -- Padlock class -------------------------------------------------------------------------------- local Padlock = setmetatable({}, BannerTemplate) Padlock.__index = Padlock function Padlock.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 20 obj.imageCaption = blurbObj:makeBannerText('tooltip') obj._imageAlt = blurbObj:makeBannerText('alt') obj._imageLink = blurbObj:makeBannerText('link') obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action] or cfg.padlockIndicatorNames.default or 'pp-default' return setmetatable(obj, Padlock) end function Padlock:__tostring() local frame = mw.getCurrentFrame() -- The nowiki tag helps prevent whitespace at the top of articles. return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{ name = 'indicator', args = {name = self._indicatorName}, content = self:renderImage() } end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- This is used for testing purposes. return { Protection = Protection, Blurb = Blurb, BannerTemplate = BannerTemplate, Banner = Banner, Padlock = Padlock, } end function p._main(args, cfg, title) args = args or {} cfg = cfg or require(CONFIG_MODULE) local protectionObj = Protection.new(args, cfg, title) local ret = {} -- If a page's edit protection is equally or more restrictive than its -- protection from some other action, then don't bother displaying anything -- for the other action (except categories). if not yesno(args.catonly) and (protectionObj.action == 'edit' or args.demolevel or not getReachableNodes( cfg.hierarchy, protectionObj.level )[effectiveProtectionLevel('edit', protectionObj.title)]) then -- Initialise the blurb object local blurbObj = Blurb.new(protectionObj, args, cfg) -- Render the banner if protectionObj:shouldShowLock() then ret[#ret + 1] = tostring( (yesno(args.small) and Padlock or Banner) .new(protectionObj, blurbObj, cfg) ) end end -- Render the categories if yesno(args.category) ~= false then ret[#ret + 1] = protectionObj:makeCategoryLinks() end return table.concat(ret) end function p.main(frame, cfg) cfg = cfg or require(CONFIG_MODULE) -- Find default args, if any. local parent = frame.getParent and frame:getParent() local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')] -- Find user args, and use the parent frame if we are being called from a -- wrapper template. getArgs = getArgs or require('Module:Arguments').getArgs local userArgs = getArgs(frame, { parentOnly = defaultArgs, frameOnly = not defaultArgs }) -- Build the args table. User-specified args overwrite default args. local args = {} for k, v in pairs(defaultArgs or {}) do args[k] = v end for k, v in pairs(userArgs) do args[k] = v end return p._main(args, cfg) end return p 894f0884d4c2da1ce19d385b96f59af654b0946a Module:Protection banner/config 828 60 459 458 2023-03-27T13:46:00Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module provides configuration data for [[Module:Protection banner]]. return { -------------------------------------------------------------------------------- -- -- BANNER DATA -- -------------------------------------------------------------------------------- --[[ -- Banner data consists of six fields: -- * text - the main protection text that appears at the top of protection -- banners. -- * explanation - the text that appears below the main protection text, used -- to explain the details of the protection. -- * tooltip - the tooltip text you see when you move the mouse over a small -- padlock icon. -- * link - the page that the small padlock icon links to. -- * alt - the alt text for the small padlock icon. This is also used as tooltip -- text for the large protection banners. -- * image - the padlock image used in both protection banners and small padlock -- icons. -- -- The module checks in three separate tables to find a value for each field. -- First it checks the banners table, which has values specific to the reason -- for the page being protected. Then the module checks the defaultBanners -- table, which has values specific to each protection level. Finally, the -- module checks the masterBanner table, which holds data for protection -- templates to use if no data has been found in the previous two tables. -- -- The values in the banner data can take parameters. These are specified -- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name -- enclosed in curly braces). -- -- Available parameters: -- -- ${CURRENTVERSION} - a link to the page history or the move log, with the -- display message "current-version-edit-display" or -- "current-version-move-display". -- -- ${EDITREQUEST} - a link to create an edit request for the current page. -- -- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes -- on the talk page; you may submit a request to ask an administrator to make -- an edit if it is minor or supported by consensus." -- -- ${IMAGELINK} - a link to set the image to, depending on the protection -- action and protection level. -- -- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry -- is set. E.g. "Editing of this page by new or unregistered users is currently -- disabled until dd Month YYYY." -- -- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation -- so that it can be used in run-on sentences. -- -- ${PAGETYPE} - the type of the page, e.g. "article" or "template". -- Defined in the cfg.pagetypes table. -- -- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g. -- "Editing of this page by new or unregistered users is currently disabled" -- -- ${PROTECTIONDATE} - the protection date, if it has been supplied to the -- template. -- -- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or -- "semi-protected". -- -- ${PROTECTIONLOG} - a link to the protection log or the pending changes log, -- depending on the protection action. -- -- ${TALKPAGE} - a link to the talk page. If a section is specified, links -- straight to that talk page section. -- -- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to -- create a blurb like "This template is semi-protected", or "This article is -- move-protected until DD Month YYYY". -- -- ${VANDAL} - links for the specified username (or the root page name) -- using Module:Vandal-m. -- -- Functions -- -- For advanced users, it is possible to use Lua functions instead of strings -- in the banner config tables. Using functions gives flexibility that is not -- possible just by using parameters. Functions take two arguments, the -- protection object and the template arguments, and they must output a string. -- -- For example: -- -- text = function (protectionObj, args) -- if protectionObj.level == 'autoconfirmed' then -- return 'foo' -- else -- return 'bar' -- end -- end -- -- Some protection object properties and methods that may be useful: -- protectionObj.action - the protection action -- protectionObj.level - the protection level -- protectionObj.reason - the protection reason -- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set -- to indefinite, and the protection time in unix time if temporary. -- protectionObj.protectionDate - the protection date in unix time, or nil if -- unspecified. -- protectionObj.bannerConfig - the banner config found by the module. Beware -- of editing the config field used by the function, as it could create an -- infinite loop. -- protectionObj:isProtected - returns a boolean showing whether the page is -- protected. -- protectionObj:isTemporary - returns a boolean showing whether the expiry is -- temporary. -- protectionObj:isIncorrect - returns a boolean showing whether the protection -- template is incorrect. --]] -- The master banner data, used if no values have been found in banners or -- defaultBanners. masterBanner = { text = '${INTROBLURB}', explanation = '${EXPLANATIONBLURB}', tooltip = '${TOOLTIPBLURB}', link = '${IMAGELINK}', alt = 'Page ${PROTECTIONLEVEL}' }, -- The default banner data. This holds banner data for different protection -- levels. -- *required* - this table needs edit, move, autoreview and upload subtables. defaultBanners = { edit = {}, move = {}, autoreview = { default = { alt = 'Page protected with pending changes', tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users', image = 'Pending-protection-shackle.svg' } }, upload = {} }, -- The banner data. This holds banner data for different protection reasons. -- In fact, the reasons specified in this table control which reasons are -- valid inputs to the first positional parameter. -- -- There is also a non-standard "description" field that can be used for items -- in this table. This is a description of the protection reason for use in the -- module documentation. -- -- *required* - this table needs edit, move, autoreview and upload subtables. banners = { edit = { blp = { description = 'For pages protected to promote compliance with the' .. ' [[Wikipedia:Biographies of living persons' .. '|biographies of living persons]] policy', text = '${INTROFRAGMENT} to promote compliance with' .. ' [[Wikipedia:Biographies of living persons' .. "|Wikipedia's&nbsp;policy on&nbsp;the&nbsp;biographies" .. ' of&nbsp;living&nbsp;people]].', tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on' .. ' biographies of living persons', }, dmca = { description = 'For pages protected by the Wikimedia Foundation' .. ' due to [[Digital Millennium Copyright Act]] takedown requests', explanation = function (protectionObj, args) local ret = 'Pursuant to a rights owner notice under the Digital' .. ' Millennium Copyright Act (DMCA) regarding some content' .. ' in this article, the Wikimedia Foundation acted under' .. ' applicable law and took down and restricted the content' .. ' in question.' if args.notice then ret = ret .. ' A copy of the received notice can be found here: ' .. args.notice .. '.' end ret = ret .. ' For more information, including websites discussing' .. ' how to file a counter-notice, please see' .. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}." .. "'''Do not remove this template from the article until the" .. " restrictions are withdrawn'''." return ret end, image = 'Office-protection-shackle.svg', }, dispute = { description = 'For pages protected due to editing disputes', text = function (protectionObj, args) -- Find the value of "disputes". local display = 'disputes' local disputes if args.section then disputes = string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[protectionObj.title.namespace].talk.name, protectionObj.title.text, args.section, display ) else disputes = display end -- Make the blurb, depending on the expiry. local msg if type(protectionObj.expiry) == 'number' then msg = '${INTROFRAGMENT} or until editing %s have been resolved.' else msg = '${INTROFRAGMENT} until editing %s have been resolved.' end return string.format(msg, disputes) end, explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', tooltip = '${TOOLTIPFRAGMENT} due to editing disputes', }, ecp = { description = 'For articles in topic areas authorized by' .. ' [[Wikipedia:Arbitration Committee|ArbCom]] or' .. ' meets the criteria for community use', tooltip = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', alt = 'Extended-protected ${PAGETYPE}', }, mainpage = { description = 'For pages protected for being displayed on the [[Main Page]]', text = 'This file is currently' .. ' [[Wikipedia:This page is protected|protected]] from' .. ' editing because it is currently or will soon be displayed' .. ' on the [[Main Page]].', explanation = 'Images on the Main Page are protected due to their high' .. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.' .. '<br /><span style="font-size:90%;">' .. "'''Administrators:''' Once this image is definitely off the Main Page," .. ' please unprotect this file, or reduce to semi-protection,' .. ' as appropriate.</span>', }, office = { description = 'For pages protected by the Wikimedia Foundation', text = function (protectionObj, args) local ret = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.' if protectionObj.protectionDate then ret = ret .. ' It has been protected since ${PROTECTIONDATE}.' end return ret end, explanation = "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not remove protection from this" .. " page unless you are authorized by the Wikimedia Foundation to do" .. " so.'''", image = 'Office-protection-shackle.svg', }, reset = { description = 'For pages protected by the Wikimedia Foundation and' .. ' "reset" to a bare-bones version', text = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.', explanation = function (protectionObj, args) local ret = '' if protectionObj.protectionDate then ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was' else ret = ret .. 'This ${PAGETYPE} has been' end ret = ret .. ' reduced to a' .. ' simplified, "bare bones" version so that it may be completely' .. ' rewritten to ensure it meets the policies of' .. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].' .. ' Standard Wikipedia policies will apply to its rewriting—which' .. ' will eventually be open to all editors—and will be strictly' .. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while' .. ' it is being rebuilt.\n\n' .. 'Any insertion of material directly from' .. ' pre-protection revisions of the ${PAGETYPE} will be removed, as' .. ' will any material added to the ${PAGETYPE} that is not properly' .. ' sourced. The associated talk page(s) were also cleared on the' .. " same date.\n\n" .. "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not override" .. " this action, and do not remove protection from this page," .. " unless you are authorized by the Wikimedia Foundation" .. " to do so. No editor may remove this notice.'''" return ret end, image = 'Office-protection-shackle.svg', }, sock = { description = 'For pages protected due to' .. ' [[Wikipedia:Sock puppetry|sock puppetry]]', text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of' .. ' [[Wikipedia:Blocking policy|blocked]] or' .. ' [[Wikipedia:Banning policy|banned users]]' .. ' from editing it.', tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from' .. ' editing it', }, template = { description = 'For [[Wikipedia:High-risk templates|high-risk]]' .. ' templates and Lua modules', text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},' .. ' as it is [[Wikipedia:High-risk templates|high-risk]].', explanation = 'Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] or' .. ' [[Wikipedia:Template editor|template editor]] to make an edit if' .. ' it is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by' .. ' [[Wikipedia:Consensus|consensus]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}' .. ' to prevent vandalism', alt = 'Permanently protected ${PAGETYPE}', }, usertalk = { description = 'For pages protected against disruptive edits by a' .. ' particular user', text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,' .. ' such as abusing the' .. ' &#123;&#123;[[Template:unblock|unblock]]&#125;&#125; template.', explanation = 'If you cannot edit this user talk page and you need to' .. ' make a change or leave a message, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for edits to a protected page' .. '|request an edit]],' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]],' .. ' [[Special:Userlogin|log in]],' .. ' or [[Special:UserLogin/signup|create an account]].', }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism|vandalism]]', text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].', explanation = function (protectionObj, args) local ret = '' if protectionObj.level == 'sysop' then ret = ret .. "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ' end return ret .. '${EXPLANATIONBLURB}' end, tooltip = '${TOOLTIPFRAGMENT} due to vandalism', } }, move = { dispute = { description = 'For pages protected against page moves due to' .. ' disputes over the page title', explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', image = 'Move-protection-shackle.svg' }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism#Page-move vandalism' .. ' |page-move vandalism]]' } }, autoreview = {}, upload = {} }, -------------------------------------------------------------------------------- -- -- GENERAL DATA TABLES -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Protection blurbs -------------------------------------------------------------------------------- -- This table produces the protection blurbs available with the -- ${PROTECTIONBLURB} parameter. It is sorted by protection action and -- protection level, and is checked by the module in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionBlurbs = { edit = { default = 'This ${PAGETYPE} is currently [[Help:Protection|' .. 'protected]] from editing', autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access' .. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered' .. ' users|unregistered]] users is currently [[Help:Protection|disabled]]', extendedconfirmed = 'This ${PAGETYPE} is currently under extended confirmed protection', }, move = { default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]' .. ' from [[Help:Moving a page|page moves]]' }, autoreview = { default = 'All edits made to this ${PAGETYPE} by' .. ' [[Wikipedia:User access levels#New users|new]] or' .. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]' .. ' users are currently' .. ' [[Wikipedia:Pending changes|subject to review]]' }, upload = { default = 'Uploading new versions of this ${PAGETYPE} is currently disabled' } }, -------------------------------------------------------------------------------- -- Explanation blurbs -------------------------------------------------------------------------------- -- This table produces the explanation blurbs available with the -- ${EXPLANATIONBLURB} parameter. It is sorted by protection action, -- protection level, and whether the page is a talk page or not. If the page is -- a talk page it will have a talk key of "talk"; otherwise it will have a talk -- key of "subject". The table is checked in the following order: -- 1. page's protection action, page's protection level, page's talk key -- 2. page's protection action, page's protection level, default talk key -- 3. page's protection action, default protection level, page's talk key -- 4. page's protection action, default protection level, default talk key -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. explanationBlurbs = { edit = { autoconfirmed = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', }, extendedconfirmed = { default = 'Extended confirmed protection prevents edits from all unregistered editors' .. ' and registered users with fewer than 30 days tenure and 500 edits.' .. ' The [[Wikipedia:Protection policy#extended|policy on community use]]' .. ' specifies that extended confirmed protection can be applied to combat' .. ' disruption, if semi-protection has proven to be ineffective.' .. ' Extended confirmed protection may also be applied to enforce' .. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].' .. ' Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask for uncontroversial changes supported by' .. ' [[Wikipedia:Consensus|consensus]].' }, default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]]. You may also [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|request]] that this page be unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' You may [[Wikipedia:Requests for page' .. ' protection#Current requests for edits to a protected page|request an' .. ' edit]] to this page, or [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|ask]] for it to be unprotected.' } }, move = { default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves on the' .. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves at' .. ' [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.' } }, autoreview = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Edits to this ${PAGETYPE} by new and unregistered users' .. ' will not be visible to readers until they are accepted by' .. ' a reviewer. To avoid the need for your edits to be' .. ' reviewed, you may' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].' }, }, upload = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but new versions of the file' .. ' cannot be uploaded until it is unprotected. You can' .. ' request that a new version be uploaded by using a' .. ' [[Wikipedia:Edit requests|protected edit request]], or you' .. ' can [[Wikipedia:Requests for page protection|request]]' .. ' that the file be unprotected.' } } }, -------------------------------------------------------------------------------- -- Protection levels -------------------------------------------------------------------------------- -- This table provides the data for the ${PROTECTIONLEVEL} parameter, which -- produces a short label for different protection levels. It is sorted by -- protection action and protection level, and is checked in the following -- order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionLevels = { edit = { default = 'protected', templateeditor = 'template-protected', extendedconfirmed = 'extended-protected', autoconfirmed = 'semi-protected', }, move = { default = 'move-protected' }, autoreview = { }, upload = { default = 'upload-protected' } }, -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- This table lists different padlock images for each protection action and -- protection level. It is used if an image is not specified in any of the -- banner data tables, and if the page does not satisfy the conditions for using -- the ['image-filename-indef'] image. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level images = { edit = { default = 'Full-protection-shackle.svg', templateeditor = 'Template-protection-shackle.svg', extendedconfirmed = 'Extended-protection-shackle.svg', autoconfirmed = 'Semi-protection-shackle.svg' }, move = { default = 'Move-protection-shackle.svg', }, autoreview = { default = 'Pending-protection-shackle.svg' }, upload = { default = 'Upload-protection-shackle.svg' } }, -- Pages with a reason specified in this table will show the special "indef" -- padlock, defined in the 'image-filename-indef' message, if no expiry is set. indefImageReasons = { template = true }, -------------------------------------------------------------------------------- -- Image links -------------------------------------------------------------------------------- -- This table provides the data for the ${IMAGELINK} parameter, which gets -- the image link for small padlock icons based on the page's protection action -- and protection level. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. imageLinks = { edit = { default = 'Wikipedia:Protection policy#full', templateeditor = 'Wikipedia:Protection policy#template', extendedconfirmed = 'Wikipedia:Protection policy#extended', autoconfirmed = 'Wikipedia:Protection policy#semi' }, move = { default = 'Wikipedia:Protection policy#move' }, autoreview = { default = 'Wikipedia:Protection policy#pending' }, upload = { default = 'Wikipedia:Protection policy#upload' } }, -------------------------------------------------------------------------------- -- Padlock indicator names -------------------------------------------------------------------------------- -- This table provides the "name" attribute for the <indicator> extension tag -- with which small padlock icons are generated. All indicator tags on a page -- are displayed in alphabetical order based on this attribute, and with -- indicator tags with duplicate names, the last tag on the page wins. -- The attribute is chosen based on the protection action; table keys must be a -- protection action name or the string "default". padlockIndicatorNames = { autoreview = 'pp-autoreview', default = 'pp-default' }, -------------------------------------------------------------------------------- -- Protection categories -------------------------------------------------------------------------------- --[[ -- The protection categories are stored in the protectionCategories table. -- Keys to this table are made up of the following strings: -- -- 1. the expiry date -- 2. the namespace -- 3. the protection reason (e.g. "dispute" or "vandalism") -- 4. the protection level (e.g. "sysop" or "autoconfirmed") -- 5. the action (e.g. "edit" or "move") -- -- When the module looks up a category in the table, first it will will check to -- see a key exists that corresponds to all five parameters. For example, a -- user page semi-protected from vandalism for two weeks would have the key -- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module -- changes the first part of the key to "all" and checks the table again. It -- keeps checking increasingly generic key combinations until it finds the -- field, or until it reaches the key "all-all-all-all-all". -- -- The module uses a binary matrix to determine the order in which to search. -- This is best demonstrated by a table. In this table, the "0" values -- represent "all", and the "1" values represent the original data (e.g. -- "indef" or "file" or "vandalism"). -- -- expiry namespace reason level action -- order -- 1 1 1 1 1 1 -- 2 0 1 1 1 1 -- 3 1 0 1 1 1 -- 4 0 0 1 1 1 -- 5 1 1 0 1 1 -- 6 0 1 0 1 1 -- 7 1 0 0 1 1 -- 8 0 0 0 1 1 -- 9 1 1 1 0 1 -- 10 0 1 1 0 1 -- 11 1 0 1 0 1 -- 12 0 0 1 0 1 -- 13 1 1 0 0 1 -- 14 0 1 0 0 1 -- 15 1 0 0 0 1 -- 16 0 0 0 0 1 -- 17 1 1 1 1 0 -- 18 0 1 1 1 0 -- 19 1 0 1 1 0 -- 20 0 0 1 1 0 -- 21 1 1 0 1 0 -- 22 0 1 0 1 0 -- 23 1 0 0 1 0 -- 24 0 0 0 1 0 -- 25 1 1 1 0 0 -- 26 0 1 1 0 0 -- 27 1 0 1 0 0 -- 28 0 0 1 0 0 -- 29 1 1 0 0 0 -- 30 0 1 0 0 0 -- 31 1 0 0 0 0 -- 32 0 0 0 0 0 -- -- In this scheme the action has the highest priority, as it is the last -- to change, and the expiry has the least priority, as it changes the most. -- The priorities of the expiry, the protection level and the action are -- fixed, but the priorities of the reason and the namespace can be swapped -- through the use of the cfg.bannerDataNamespaceHasPriority table. --]] -- If the reason specified to the template is listed in this table, -- namespace data will take priority over reason data in the protectionCategories -- table. reasonsWithNamespacePriority = { vandalism = true, }, -- The string to use as a namespace key for the protectionCategories table for each -- namespace number. categoryNamespaceKeys = { [ 2] = 'user', [ 3] = 'user', [ 4] = 'project', [ 6] = 'file', [ 8] = 'mediawiki', [ 10] = 'template', [ 12] = 'project', [ 14] = 'category', [100] = 'portal', [828] = 'module', }, protectionCategories = { ['all|all|all|all|all'] = 'Wikipedia fully protected pages', ['all|all|office|all|all'] = 'Wikipedia Office-protected pages', ['all|all|reset|all|all'] = 'Wikipedia Office-protected pages', ['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages', ['all|all|mainpage|all|all'] = 'Wikipedia fully-protected main page files', ['all|all|all|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|template|all|all|edit'] = 'Wikipedia fully protected templates', ['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages', ['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages', ['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people', ['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people', ['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute', ['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users', ['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism', ['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories', ['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files', ['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals', ['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages', ['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages', ['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates', ['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages', ['all|all|all|templateeditor|edit'] = 'Wikipedia template-protected pages other than templates and modules', ['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates', ['all|template|all|templateeditor|move'] = 'Wikipedia template-protected templates', -- move-protected templates ['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people', ['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people', ['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute', ['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users', ['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism', ['all|category|all|sysop|edit'] = 'Wikipedia fully protected categories', ['all|file|all|sysop|edit'] = 'Wikipedia fully-protected files', ['all|project|all|sysop|edit'] = 'Wikipedia fully-protected project pages', ['all|talk|all|sysop|edit'] = 'Wikipedia fully-protected talk pages', ['all|template|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates', ['all|user|all|sysop|edit'] = 'Wikipedia fully protected user and user talk pages', ['all|module|all|all|edit'] = 'Wikipedia fully-protected modules', ['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules', ['all|module|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected modules', ['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules', ['all|all|all|sysop|move'] = 'Wikipedia move-protected pages', ['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages', ['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute', ['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism', ['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals', ['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages', ['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages', ['all|template|all|sysop|move'] = 'Wikipedia move-protected templates', ['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages', ['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages', ['all|file|all|all|upload'] = 'Wikipedia upload-protected files', }, -------------------------------------------------------------------------------- -- Expiry category config -------------------------------------------------------------------------------- -- This table configures the expiry category behaviour for each protection -- action. -- * If set to true, setting that action will always categorise the page if -- an expiry parameter is not set. -- * If set to false, setting that action will never categorise the page. -- * If set to nil, the module will categorise the page if: -- 1) an expiry parameter is not set, and -- 2) a reason is provided, and -- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck -- table. expiryCheckActions = { edit = nil, move = false, autoreview = true, upload = false }, reasonsWithoutExpiryCheck = { blp = true, template = true, }, -------------------------------------------------------------------------------- -- Pagetypes -------------------------------------------------------------------------------- -- This table produces the page types available with the ${PAGETYPE} parameter. -- Keys are namespace numbers, or the string "default" for the default value. pagetypes = { [0] = 'article', [6] = 'file', [10] = 'template', [14] = 'category', [828] = 'module', default = 'page' }, -------------------------------------------------------------------------------- -- Strings marking indefinite protection -------------------------------------------------------------------------------- -- This table contains values passed to the expiry parameter that mean the page -- is protected indefinitely. indefStrings = { ['indef'] = true, ['indefinite'] = true, ['indefinitely'] = true, ['infinite'] = true, }, -------------------------------------------------------------------------------- -- Group hierarchy -------------------------------------------------------------------------------- -- This table maps each group to all groups that have a superset of the original -- group's page editing permissions. hierarchy = { sysop = {}, reviewer = {'sysop'}, filemover = {'sysop'}, templateeditor = {'sysop'}, extendedconfirmed = {'sysop'}, autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'}, user = {'autoconfirmed'}, ['*'] = {'user'} }, -------------------------------------------------------------------------------- -- Wrapper templates and their default arguments -------------------------------------------------------------------------------- -- This table contains wrapper templates used with the module, and their -- default arguments. Templates specified in this table should contain the -- following invocation, and no other template content: -- -- {{#invoke:Protection banner|main}} -- -- If other content is desired, it can be added between -- <noinclude>...</noinclude> tags. -- -- When a user calls one of these wrapper templates, they will use the -- default arguments automatically. However, users can override any of the -- arguments. wrappers = { ['Template:Pp'] = {}, ['Template:Pp-extended'] = {'ecp'}, ['Template:Pp-blp'] = {'blp'}, -- we don't need Template:Pp-create ['Template:Pp-dispute'] = {'dispute'}, ['Template:Pp-main-page'] = {'mainpage'}, ['Template:Pp-move'] = {action = 'move', catonly = 'yes'}, ['Template:Pp-move-dispute'] = {'dispute', action = 'move', catonly = 'yes'}, -- we don't need Template:Pp-move-indef ['Template:Pp-move-vandalism'] = {'vandalism', action = 'move', catonly = 'yes'}, ['Template:Pp-office'] = {'office'}, ['Template:Pp-office-dmca'] = {'dmca'}, ['Template:Pp-pc'] = {action = 'autoreview', small = true}, ['Template:Pp-pc1'] = {action = 'autoreview', small = true}, ['Template:Pp-reset'] = {'reset'}, ['Template:Pp-semi-indef'] = {small = true}, ['Template:Pp-sock'] = {'sock'}, ['Template:Pp-template'] = {'template', small = true}, ['Template:Pp-upload'] = {action = 'upload'}, ['Template:Pp-usertalk'] = {'usertalk'}, ['Template:Pp-vandalism'] = {'vandalism'}, }, -------------------------------------------------------------------------------- -- -- MESSAGES -- -------------------------------------------------------------------------------- msg = { -------------------------------------------------------------------------------- -- Intro blurb and intro fragment -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${INTROBLURB} and -- ${INTROFRAGMENT} parameters. If the protection is temporary they use the -- intro-blurb-expiry or intro-fragment-expiry, and if not they use -- intro-blurb-noexpiry or intro-fragment-noexpiry. -- It is possible to use banner parameters in these messages. ['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.', ['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.', ['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},', ['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}', -------------------------------------------------------------------------------- -- Tooltip blurb -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${TOOLTIPBLURB} parameter. -- If the protection is temporary the tooltip-blurb-expiry message is used, and -- if not the tooltip-blurb-noexpiry message is used. -- It is possible to use banner parameters in these messages. ['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.', ['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.', ['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},', ['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', -------------------------------------------------------------------------------- -- Special explanation blurb -------------------------------------------------------------------------------- -- An explanation blurb for pages that cannot be unprotected, e.g. for pages -- in the MediaWiki namespace. -- It is possible to use banner parameters in this message. ['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]].', -------------------------------------------------------------------------------- -- Protection log display values -------------------------------------------------------------------------------- -- These messages determine the display values for the protection log link -- or the pending changes log link produced by the ${PROTECTIONLOG} parameter. -- It is possible to use banner parameters in these messages. ['protection-log-display'] = 'protection log', ['pc-log-display'] = 'pending changes log', -------------------------------------------------------------------------------- -- Current version display values -------------------------------------------------------------------------------- -- These messages determine the display values for the page history link -- or the move log link produced by the ${CURRENTVERSION} parameter. -- It is possible to use banner parameters in these messages. ['current-version-move-display'] = 'current title', ['current-version-edit-display'] = 'current version', -------------------------------------------------------------------------------- -- Talk page -------------------------------------------------------------------------------- -- This message determines the display value of the talk page link produced -- with the ${TALKPAGE} parameter. -- It is possible to use banner parameters in this message. ['talk-page-link-display'] = 'talk page', -------------------------------------------------------------------------------- -- Edit requests -------------------------------------------------------------------------------- -- This message determines the display value of the edit request link produced -- with the ${EDITREQUEST} parameter. -- It is possible to use banner parameters in this message. ['edit-request-display'] = 'submit an edit request', -------------------------------------------------------------------------------- -- Expiry date format -------------------------------------------------------------------------------- -- This is the format for the blurb expiry date. It should be valid input for -- the first parameter of the #time parser function. ['expiry-date-format'] = 'F j, Y "at" H:i e', -------------------------------------------------------------------------------- -- Tracking categories -------------------------------------------------------------------------------- -- These messages determine which tracking categories the module outputs. ['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates', ['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules', -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- These are images that are not defined by their protection action and protection level. ['image-filename-indef'] = 'Full-protection-shackle.svg', ['image-filename-default'] = 'Transparent.gif', -------------------------------------------------------------------------------- -- End messages -------------------------------------------------------------------------------- } -------------------------------------------------------------------------------- -- End configuration -------------------------------------------------------------------------------- } 59c408f72ce81e080cce79518231e85981ebcf3b Module:Documentation 828 43 461 460 2023-03-27T13:46:00Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return '<span class="' .. message('toolbar-class') .. '">(' .. table.concat(ret, ' &#124; ') .. ')</span>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.fullUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') else pagetype = message('sandbox-notice-pagetype-other') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(message('sandbox-category')) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end local data = {} data.title = title data.docTitle = docTitle -- View, display, edit, and purge links if /doc exists. data.viewLinkDisplay = message('view-link-display') data.editLinkDisplay = message('edit-link-display') data.historyLinkDisplay = message('history-link-display') data.purgeLinkDisplay = message('purge-link-display') -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end data.preload = preload data.createLinkDisplay = message('create-link-display') return data end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local function escapeBrackets(s) -- Escapes square brackets with HTML entities. s = s:gsub('%[', '&#91;') -- Replace square brackets with HTML entities. s = s:gsub('%]', '&#93;') return s end local ret local docTitle = data.docTitle local title = data.title local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay) local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay) ret = '[%s] [%s] [%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink) else local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) ret = '[%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, createLink, purgeLink) end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editUrl = docTitle:fullUrl{action = 'edit'} local editDisplay = message('edit-link-display') local editLink = makeUrlLink(editUrl, editDisplay) local historyUrl = docTitle:fullUrl{action = 'history'} local historyDisplay = message('history-link-display') local historyLink = makeUrlLink(historyUrl, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'} local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p 2fd7faef98df56f55eede30c4ff07b2431823ee1 Template:High-use 10 106 463 462 2023-03-27T13:46:02Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#invoke:High-use|main|1={{{1|}}}|2={{{2|}}}|info={{{info|}}}|demo={{{demo|}}}|form={{{form|}}}|expiry={{{expiry|}}}|system={{{system|}}}}}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage; interwiki links go to Wikidata, thank you! --> </noinclude> a3322d1bd47ac03df14fa2090855cff4fede9bc7 Module:High-use 828 111 465 464 2023-03-27T13:46:02Z 17ademoladav 2 1 revision imported Scribunto text/plain local p = {} -- _fetch looks at the "demo" argument. local _fetch = require('Module:Transclusion_count').fetch local yesno = require('Module:Yesno') function p.num(frame, count) if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end -- Build output string local return_value = "" if count == nil then if frame.args[1] == "risk" then return_value = "a very large number of" else return_value = "many" end else -- Use 2 significant figures for smaller numbers and 3 for larger ones local sigfig = 2 if count >= 100000 then sigfig = 3 end -- Prepare to round to appropriate number of sigfigs local f = math.floor(math.log10(count)) - sigfig + 1 -- Round and insert "approximately" or "+" when appropriate if (frame.args[2] == "yes") or (mw.ustring.sub(frame.args[1],-1) == "+") then -- Round down return_value = string.format("%s+", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) ) * (10^(f))) ) else -- Round to nearest return_value = string.format("approximately&#x20;%s", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) + 0.5) * (10^(f))) ) end -- Insert percentage of pages if that is likely to be >= 1% and when |no-percent= not set to yes if count and count > 250000 and not yesno (frame:getParent().args['no-percent']) then local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5) if percent >= 1 then return_value = string.format("%s&#x20;pages, or roughly %s%% of all", return_value, percent) end end end return return_value end -- Actions if there is a large (greater than or equal to 100,000) transclusion count function p.risk(frame) local return_value = "" if frame.args[1] == "risk" then return_value = "risk" else local count = _fetch(frame) if count and count >= 100000 then return_value = "risk" end end return return_value end function p.text(frame, count) -- Only show the information about how this template gets updated if someone -- is actually editing the page and maybe trying to update the count. local bot_text = (frame:preprocess("{{REVISIONID}}") == "") and "\n\n----\n'''Preview message''': Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]])." or '' if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end local title = mw.title.getCurrentTitle() if title.subpageText == "doc" or title.subpageText == "sandbox" then title = title.basePageTitle end local systemMessages = frame.args['system'] if frame.args['system'] == '' then systemMessages = nil end -- This retrieves the project URL automatically to simplify localiation. local templateCount = ('on [https://linkcount.toolforge.org/index.php?project=%s&page=%s %s pages]'):format( mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'), mw.uri.encode(title.fullText), p.num(frame, count)) local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used '; if systemMessages then used_on_text = used_on_text .. systemMessages .. ((count and count > 2000) and ("''', and " .. templateCount) or ("'''")) else used_on_text = used_on_text .. templateCount .. "'''" end local sandbox_text = ("%s's [[%s/sandbox|/sandbox]] or [[%s/testcases|/testcases]] subpages, or in your own [[%s]]. "):format( (mw.title.getCurrentTitle().namespace == 828 and "module" or "template"), title.fullText, title.fullText, mw.title.getCurrentTitle().namespace == 828 and "Module:Sandbox|module sandbox" or "Wikipedia:User pages#SUB|user subpage" ) local infoArg = frame.args["info"] ~= "" and frame.args["info"] if (systemMessages or frame.args[1] == "risk" or (count and count >= 100000) ) then local info = systemMessages and '.<br/>Changes to it can cause immediate changes to the Wikipedia user interface.' or '.' if infoArg then info = info .. "<br />" .. infoArg end sandbox_text = info .. '<br /> To avoid major disruption' .. (count and count >= 100000 and ' and server load' or '') .. ', any changes should be tested in the ' .. sandbox_text .. 'The tested changes can be added to this page in a single edit. ' else sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' and c') .. 'hanges may be widely noticed. Test changes in the ' .. sandbox_text end local discussion_text = systemMessages and 'Please discuss changes ' or 'Consider discussing changes ' if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then discussion_text = string.format("%sat [[%s]]", discussion_text, frame.args["2"]) else discussion_text = string.format("%son the [[%s|talk page]]", discussion_text, title.talkPageTitle.fullText ) end return used_on_text .. sandbox_text .. discussion_text .. " before implementing them." .. bot_text end function p.main(frame) local count = nil if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end local image = "[[File:Ambox warning yellow.svg|40px|alt=Warning|link=]]" local type_param = "style" local epilogue = '' if frame.args['system'] and frame.args['system'] ~= '' then image = "[[File:Ambox important.svg|40px|alt=Warning|link=]]" type_param = "content" local nocat = frame:getParent().args['nocat'] or frame.args['nocat'] local categorise = (nocat == '' or not yesno(nocat)) if categorise then epilogue = frame:preprocess('{{Sandbox other||{{#switch:{{#invoke:Effective protection level|{{#switch:{{NAMESPACE}}|File=upload|#default=edit}}|{{FULLPAGENAME}}}}|sysop|templateeditor|interfaceadmin=|#default=[[Category:Pages used in system messages needing protection]]}}}}') end elseif (frame.args[1] == "risk" or (count and count >= 100000)) then image = "[[File:Ambox warning orange.svg|40px|alt=Warning|link=]]" type_param = "content" end if frame.args["form"] == "editnotice" then return frame:expandTemplate{ title = 'editnotice', args = { ["image"] = image, ["text"] = p.text(frame, count), ["expiry"] = (frame.args["expiry"] or "") } } .. epilogue else return require('Module:Message box').main('ombox', { type = type_param, image = image, text = p.text(frame, count), expiry = (frame.args["expiry"] or "") }) .. epilogue end end return p 134551888e066954a89c109d2faa8af71a4454a4 Module:Transclusion count 828 114 467 466 2023-03-27T13:46:02Z 17ademoladav 2 1 revision imported Scribunto text/plain local p = {} function p.fetch(frame) local template = nil local return_value = nil -- Use demo parameter if it exists, otherswise use current template name local namespace = mw.title.getCurrentTitle().namespace if frame.args["demo"] and frame.args["demo"] ~= "" then template = mw.ustring.gsub(frame.args["demo"],"^[Tt]emplate:","") elseif namespace == 10 then -- Template namespace template = mw.title.getCurrentTitle().text elseif namespace == 828 then -- Module namespace template = (mw.site.namespaces[828].name .. ":" .. mw.title.getCurrentTitle().text) end -- If in template or module namespace, look up count in /data if template ~= nil then namespace = mw.title.new(template, "Template").namespace if namespace == 10 or namespace == 828 then template = mw.ustring.gsub(template, "/doc$", "") -- strip /doc from end template = mw.ustring.gsub(template, "/sandbox$", "") -- strip /sandbox from end local index = mw.ustring.sub(mw.title.new(template).text,1,1) local status, data = pcall(function () return(mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other"))) end) if status then return_value = tonumber(data[mw.ustring.gsub(template, " ", "_")]) end end end -- If database value doesn't exist, use value passed to template if return_value == nil and frame.args[1] ~= nil then local arg1=mw.ustring.match(frame.args[1], '[%d,]+') if arg1 and arg1 ~= '' then return_value = tonumber(frame:callParserFunction('formatnum', arg1, 'R')) end end return return_value end -- Tabulate this data for [[Wikipedia:Database reports/Templates transcluded on the most pages]] function p.tabulate(frame) local list = {} for i = 65, 91 do local data = mw.loadData('Module:Transclusion count/data/' .. ((i == 91) and 'other' or string.char(i))) for name, count in pairs(data) do table.insert(list, {mw.title.new(name, "Template").fullText, count}) end end table.sort(list, function(a, b) return (a[2] == b[2]) and (a[1] < b[1]) or (a[2] > b[2]) end) local lang = mw.getContentLanguage(); for i = 1, #list do list[i] = ('|-\n| %d || [[%s]] || %s\n'):format(i, list[i][1]:gsub('_', ' '), lang:formatNum(list[i][2])) end return table.concat(list) end return p 000ef6bcbf7b66e727870b0c300c4009da300513 Module:Lua banner 828 54 469 468 2023-03-27T13:46:03Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module implements the {{lua}} template. local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local p = {} function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end function p._main(args) local modules = mTableTools.compressSparseArray(args) local box = p.renderBox(modules) local trackingCategories = p.renderTrackingCategories(args, modules) return box .. trackingCategories end function p.renderBox(modules) local boxArgs = {} if #modules < 1 then boxArgs.text = '<strong class="error">Error: no modules specified</strong>' else local moduleLinks = {} for i, module in ipairs(modules) do moduleLinks[i] = string.format('[[:%s]]', module) local maybeSandbox = mw.title.new(module .. '/sandbox') if maybeSandbox.exists then moduleLinks[i] = moduleLinks[i] .. string.format(' ([[:%s|sandbox]])', maybeSandbox.fullText) end end local moduleList = mList.makeList('bulleted', moduleLinks) local title = mw.title.getCurrentTitle() if title.subpageText == "doc" then title = title.basePageTitle end if title.contentModel == "Scribunto" then boxArgs.text = 'This module depends on the following other modules:' .. moduleList else boxArgs.text = 'This template uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList end end boxArgs.type = 'notice' boxArgs.small = true boxArgs.image = '[[File:Lua-Logo.svg|30px|alt=|link=]]' return mMessageBox.main('mbox', boxArgs) end function p.renderTrackingCategories(args, modules, titleObj) if yesno(args.nocat) then return '' end local cats = {} -- Error category if #modules < 1 then cats[#cats + 1] = 'Lua templates with errors' end -- Lua templates category titleObj = titleObj or mw.title.getCurrentTitle() local subpageBlacklist = { doc = true, sandbox = true, sandbox2 = true, testcases = true } if not subpageBlacklist[titleObj.subpageText] then local protCatName if titleObj.namespace == 10 then local category = args.category if not category then local categories = { ['Module:String'] = 'Templates based on the String Lua module', ['Module:Math'] = 'Templates based on the Math Lua module', ['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module', ['Module:Citation/CS1'] = 'Templates based on the Citation/CS1 Lua module' } category = modules[1] and categories[modules[1]] category = category or 'Lua-based templates' end cats[#cats + 1] = category protCatName = "Templates using under-protected Lua modules" elseif titleObj.namespace == 828 then protCatName = "Modules depending on under-protected modules" end if not args.noprotcat and protCatName then local protLevels = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } local currentProt if titleObj.id ~= 0 then -- id is 0 (page does not exist) if am previewing before creating a template. currentProt = titleObj.protectionLevels["edit"][1] end if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end for i, module in ipairs(modules) do if module ~= "WP:libraryUtil" then local moduleProt = mw.title.new(module).protectionLevels["edit"][1] if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end if moduleProt < currentProt then cats[#cats + 1] = protCatName break end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end return p 03ec1b34a40121efc562c0c64a67ebbf57d56dff Module:Transclusion count/data/I 828 115 471 470 2023-03-27T13:46:05Z 17ademoladav 2 1 revision imported Scribunto text/plain return { ["IAAF_name"] = 2200, ["IAST"] = 5900, ["IBDB_name"] = 9000, ["ICD10"] = 4600, ["ICD9"] = 4400, ["ICS"] = 2800, ["IDN"] = 3300, ["IMDb_episode"] = 9600, ["IMDb_episodes"] = 2400, ["IMDb_name"] = 151000, ["IMDb_title"] = 186000, ["IMO_Number"] = 4000, ["IMSLP"] = 8100, ["INA"] = 2000, ["IND"] = 7500, ["INR"] = 6200, ["INRConvert"] = 5400, ["INRConvert/CurrentRate"] = 5400, ["INRConvert/USD"] = 5400, ["INRConvert/out"] = 5400, ["IOC_profile"] = 6000, ["IP"] = 2500, ["IPA"] = 139000, ["IPA-all"] = 3500, ["IPA-de"] = 7800, ["IPA-es"] = 7800, ["IPA-fr"] = 43000, ["IPA-it"] = 5800, ["IPA-nl"] = 3700, ["IPA-pl"] = 4000, ["IPA-pt"] = 3600, ["IPA-ru"] = 2600, ["IPA-sh"] = 2700, ["IPA-sl"] = 6900, ["IPA-th"] = 2900, ["IPA_audio_link"] = 19000, ["IPA_link"] = 3300, ["IPAc-cmn"] = 2600, ["IPAc-en"] = 47000, ["IPAc-pl"] = 52000, ["IPC_athlete"] = 2600, ["IPSummary"] = 77000, ["IP_summary"] = 78000, ["IPsock"] = 9200, ["IPtalk"] = 21000, ["IPuser"] = 6800, ["IPvandal"] = 2700, ["IRC"] = 6500, ["IRI"] = 2100, ["IRL"] = 5600, ["IRN"] = 3500, ["ISBN"] = 460000, ["ISBNT"] = 38000, ["ISBN_missing"] = 2200, ["ISFDB_name"] = 4000, ["ISFDB_title"] = 4500, ["ISL"] = 2100, ["ISO_15924/script-example-character"] = 2700, ["ISO_15924/wp-article"] = 2700, ["ISO_15924/wp-article/format"] = 2700, ["ISO_15924/wp-article/label"] = 2700, ["ISO_3166_code"] = 493000, ["ISO_3166_name"] = 16000, ["ISO_639_name"] = 7800, ["ISP"] = 5300, ["ISR"] = 4700, ["ISSN"] = 12000, ["ISSN_link"] = 30000, ["ISTAT"] = 8100, ["ISU_figure_skater"] = 2500, ["ITA"] = 17000, ["ITF"] = 6000, ["ITF_profile"] = 8900, ["ITIS"] = 4300, ["ITN_talk"] = 9600, ["ITN_talk/date"] = 9600, ["IUCN_banner"] = 15000, ["I_sup"] = 4500, ["Iaaf_name"] = 7400, ["Ice_hockey"] = 20000, ["Ice_hockey_stats"] = 16000, ["Icehockeystats"] = 11000, ["Icon"] = 565000, ["If"] = 262000, ["If_all"] = 5900, ["If_between"] = 3700, ["If_both"] = 9970000, ["If_empty"] = 2950000, ["If_first_display_both"] = 61000, ["If_in_page"] = 8200, ["If_last_display_both"] = 30000, ["If_preview"] = 57000, ["If_then_show"] = 259000, ["Ifempty"] = 4000, ["Ifeq"] = 16000, ["Iferror_then_show"] = 3200, ["Ifexist_not_redirect"] = 1100000, ["Ifnotempty"] = 14000, ["Ifnumber"] = 32000, ["Ifsubst"] = 95000, ["Ih"] = 7400, ["Ill"] = 111000, ["Illm"] = 6900, ["Image_frame"] = 3700, ["Image_label"] = 4500, ["Image_label_begin"] = 3800, ["Image_label_end"] = 3500, ["Image_label_small"] = 2600, ["Image_needed"] = 4500, ["Image_other"] = 279000, ["Image_requested"] = 170000, ["Image_requested/Category_helper"] = 162000, ["Imbox"] = 909000, ["Imdb_name"] = 5400, ["Imdb_title"] = 4300, ["Import_style"] = 10000, ["Import_style/inputbox.css"] = 10000, ["Importance"] = 5500000, ["Importance/colour"] = 5510000, ["Importance_mask"] = 8540000, ["Improve_categories"] = 6600, ["In_class"] = 5600, ["In_lang"] = 350000, ["In_progress"] = 3100, ["In_string"] = 69000, ["In_title"] = 18000, ["Inactive_WikiProject_banner"] = 214000, ["Inactive_userpage_blanked"] = 4900, ["Include-USGov"] = 29000, ["Incomplete_list"] = 22000, ["Inconclusive"] = 2000, ["Increase"] = 41000, ["Incumbent_pope"] = 4300, ["Indent"] = 4200, ["IndexFungorum"] = 2200, ["Indian_English"] = 4200, ["Indian_Rupee"] = 10000, ["Indian_railway_code"] = 3100, ["Inflation"] = 18000, ["Inflation-fn"] = 5300, ["Inflation-year"] = 4300, ["Inflation/IN/startyear"] = 5400, ["Inflation/UK"] = 4200, ["Inflation/UK/dataset"] = 4200, ["Inflation/UK/startyear"] = 4200, ["Inflation/US"] = 11000, ["Inflation/US/dataset"] = 11000, ["Inflation/US/startyear"] = 11000, ["Inflation/fn"] = 6000, ["Inflation/year"] = 23000, ["Info"] = 7200, ["Infobox"] = 3180000, ["Infobox/Columns"] = 2300, ["Infobox/mobileviewfix.css"] = 24000, ["Infobox3cols"] = 16000, ["Infobox_AFL_biography"] = 14000, ["Infobox_Aircraft_Begin"] = 5400, ["Infobox_Aircraft_Type"] = 4800, ["Infobox_Athletics_Championships"] = 2600, ["Infobox_Australian_place"] = 15000, ["Infobox_CFL_biography"] = 2300, ["Infobox_COA_wide"] = 3100, ["Infobox_Canada_electoral_district"] = 2400, ["Infobox_Canadian_Football_League_biography"] = 5900, ["Infobox_Canadian_Football_League_biography/position"] = 5800, ["Infobox_Chinese"] = 20000, ["Infobox_Chinese/Chinese"] = 2600, ["Infobox_Chinese/Footer"] = 8700, ["Infobox_Chinese/Header"] = 8700, ["Infobox_Chinese/Korean"] = 17000, ["Infobox_Christian_leader"] = 18000, ["Infobox_Election"] = 2400, ["Infobox_French_commune"] = 38000, ["Infobox_GAA_player"] = 3200, ["Infobox_Gaelic_games_player"] = 4900, ["Infobox_German_location"] = 13000, ["Infobox_German_place"] = 14000, ["Infobox_Greece_place"] = 2800, ["Infobox_Greek_Dimos"] = 2800, ["Infobox_Hindu_temple"] = 2400, ["Infobox_Indian_state_legislative_assembly_constituency"] = 3900, ["Infobox_Italian_comune"] = 8100, ["Infobox_Korean_name"] = 15000, ["Infobox_Korean_name/categories"] = 15000, ["Infobox_MLB_yearly"] = 3100, ["Infobox_NASCAR_race_report"] = 2000, ["Infobox_NCAA_team_season"] = 18000, ["Infobox_NFL_biography"] = 27000, ["Infobox_NFL_player"] = 8100, ["Infobox_NFL_season"] = 2600, ["Infobox_NFL_team_season"] = 3900, ["Infobox_NRHP"] = 72000, ["Infobox_NRHP/conv"] = 18000, ["Infobox_NRHP/locmapin2region"] = 66000, ["Infobox_Officeholder"] = 5200, ["Infobox_Olympic_event"] = 7300, ["Infobox_Olympic_event/games_text"] = 7300, ["Infobox_Paralympic_event"] = 2500, ["Infobox_Paralympic_event/games_text"] = 2500, ["Infobox_Politician"] = 2200, ["Infobox_Romanian_subdivision"] = 3100, ["Infobox_Russian_district"] = 2000, ["Infobox_Russian_inhabited_locality"] = 4400, ["Infobox_SCOTUS_case"] = 3700, ["Infobox_Site_of_Special_Scientific_Interest"] = 2000, ["Infobox_Swiss_town"] = 2800, ["Infobox_Switzerland_municipality"] = 2900, ["Infobox_Turkey_place"] = 11000, ["Infobox_U.S._county"] = 3000, ["Infobox_U.S._county/district"] = 3000, ["Infobox_UK_constituency"] = 2100, ["Infobox_UK_constituency/year"] = 2100, ["Infobox_UK_legislation"] = 2500, ["Infobox_UK_place"] = 25000, ["Infobox_UK_place/NoDialCode"] = 7800, ["Infobox_UK_place/NoPostCode"] = 2900, ["Infobox_UK_place/area"] = 2300, ["Infobox_UK_place/dist"] = 2500, ["Infobox_UK_place/local"] = 25000, ["Infobox_UK_place/styles.css"] = 25000, ["Infobox_UN_resolution"] = 2300, ["Infobox_US_Supreme_Court_case"] = 3800, ["Infobox_US_Supreme_Court_case/courts"] = 3800, ["Infobox_Wikipedia_user"] = 9400, ["Infobox_YouTube_personality"] = 2500, ["Infobox_academic"] = 13000, ["Infobox_aircraft_begin"] = 14000, ["Infobox_aircraft_occurrence"] = 2200, ["Infobox_aircraft_type"] = 12000, ["Infobox_airline"] = 4500, ["Infobox_airport"] = 15000, ["Infobox_airport/datatable"] = 14000, ["Infobox_album"] = 160000, ["Infobox_album/color"] = 188000, ["Infobox_album/link"] = 160000, ["Infobox_anatomy"] = 4400, ["Infobox_ancient_site"] = 5200, ["Infobox_animanga/Footer"] = 6700, ["Infobox_animanga/Header"] = 6700, ["Infobox_animanga/Print"] = 5300, ["Infobox_animanga/Video"] = 4600, ["Infobox_architect"] = 3600, ["Infobox_artist"] = 28000, ["Infobox_artist_discography"] = 5900, ["Infobox_artwork"] = 11000, ["Infobox_athlete"] = 3100, ["Infobox_automobile"] = 8300, ["Infobox_award"] = 12000, ["Infobox_badminton_player"] = 3200, ["Infobox_baseball_biography"] = 28000, ["Infobox_baseball_biography/style"] = 28000, ["Infobox_baseball_biography/styles.css"] = 28000, ["Infobox_basketball_biography"] = 20000, ["Infobox_basketball_biography/style"] = 20000, ["Infobox_basketball_club"] = 3000, ["Infobox_beauty_pageant"] = 2400, ["Infobox_bilateral_relations"] = 4300, ["Infobox_body_of_water"] = 17000, ["Infobox_book"] = 51000, ["Infobox_boxer"] = 5600, ["Infobox_bridge"] = 5900, ["Infobox_building"] = 26000, ["Infobox_character"] = 7800, ["Infobox_chess_biography"] = 3600, ["Infobox_chess_player"] = 3000, ["Infobox_church"] = 14000, ["Infobox_church/denomination"] = 14000, ["Infobox_church/font_color"] = 14000, ["Infobox_civil_conflict"] = 2300, ["Infobox_civilian_attack"] = 5100, ["Infobox_college_coach"] = 11000, ["Infobox_college_football_game"] = 2100, ["Infobox_college_sports_team_season"] = 38000, ["Infobox_college_sports_team_season/link"] = 38000, ["Infobox_college_sports_team_season/name"] = 38000, ["Infobox_college_sports_team_season/succession"] = 38000, ["Infobox_college_sports_team_season/team"] = 38000, ["Infobox_comic_book_title"] = 2900, ["Infobox_comics_character"] = 3600, ["Infobox_comics_creator"] = 3500, ["Infobox_comics_creator/styles.css"] = 3500, ["Infobox_company"] = 82000, ["Infobox_computing_device"] = 2300, ["Infobox_concert"] = 3200, ["Infobox_constituency"] = 5000, ["Infobox_country"] = 6200, ["Infobox_country/formernext"] = 5900, ["Infobox_country/imagetable"] = 5100, ["Infobox_country/multirow"] = 8100, ["Infobox_country/status_text"] = 2700, ["Infobox_country/styles.css"] = 6200, ["Infobox_country_at_games"] = 14000, ["Infobox_country_at_games/core"] = 14000, ["Infobox_country_at_games/see_also"] = 11000, ["Infobox_court_case"] = 4600, ["Infobox_court_case/images"] = 2400, ["Infobox_cricket_tournament"] = 2200, ["Infobox_cricketer"] = 32000, ["Infobox_cricketer/career"] = 32000, ["Infobox_cricketer/national_side"] = 7500, ["Infobox_criminal"] = 6100, ["Infobox_curler"] = 2600, ["Infobox_cycling_race_report"] = 4400, ["Infobox_cyclist"] = 16000, ["Infobox_dam"] = 5500, ["Infobox_designation_list"] = 19000, ["Infobox_designation_list/entry"] = 16000, ["Infobox_dim"] = 6800, ["Infobox_dim/core"] = 6800, ["Infobox_diocese"] = 3800, ["Infobox_drug"] = 9300, ["Infobox_drug/chemical_formula"] = 9300, ["Infobox_drug/data_page_link"] = 9300, ["Infobox_drug/formatATC"] = 9200, ["Infobox_drug/formatCASnumber"] = 9300, ["Infobox_drug/formatChEBI"] = 9300, ["Infobox_drug/formatChEMBL"] = 9300, ["Infobox_drug/formatChemDBNIAID"] = 9300, ["Infobox_drug/formatChemSpider"] = 9300, ["Infobox_drug/formatCompTox"] = 9300, ["Infobox_drug/formatDrugBank"] = 9300, ["Infobox_drug/formatIUPHARBPS"] = 9300, ["Infobox_drug/formatJmol"] = 9300, ["Infobox_drug/formatKEGG"] = 9300, ["Infobox_drug/formatPDBligand"] = 8600, ["Infobox_drug/formatPubChemCID"] = 9300, ["Infobox_drug/formatPubChemSID"] = 9300, ["Infobox_drug/formatUNII"] = 9300, ["Infobox_drug/legal_status"] = 9400, ["Infobox_drug/licence"] = 9300, ["Infobox_drug/maintenance_categories"] = 9300, ["Infobox_drug/non-ref-space"] = 3700, ["Infobox_drug/pregnancy_category"] = 9300, ["Infobox_drug/title"] = 9300, ["Infobox_election"] = 28000, ["Infobox_election/row"] = 28000, ["Infobox_election/shortname"] = 26000, ["Infobox_enzyme"] = 5100, ["Infobox_ethnic_group"] = 7100, ["Infobox_event"] = 5100, ["Infobox_family"] = 2000, ["Infobox_figure_skater"] = 4100, ["Infobox_film"] = 153000, ["Infobox_film/short_description"] = 149000, ["Infobox_film_awards"] = 2600, ["Infobox_film_awards/link"] = 2600, ["Infobox_film_awards/style"] = 2600, ["Infobox_food"] = 6700, ["Infobox_football_biography"] = 204000, ["Infobox_football_club"] = 27000, ["Infobox_football_club_season"] = 19000, ["Infobox_football_league"] = 2500, ["Infobox_football_league_season"] = 19000, ["Infobox_football_match"] = 5700, ["Infobox_football_tournament_season"] = 7500, ["Infobox_former_subdivision"] = 3300, ["Infobox_former_subdivision/styles.css"] = 3300, ["Infobox_galaxy"] = 2000, ["Infobox_game"] = 2400, ["Infobox_game_score"] = 3400, ["Infobox_gene"] = 13000, ["Infobox_given_name"] = 4000, ["Infobox_golfer"] = 4400, ["Infobox_golfer/highest_ranking"] = 4400, ["Infobox_government_agency"] = 10000, ["Infobox_government_cabinet"] = 2400, ["Infobox_gridiron_football_person"] = 2600, ["Infobox_gridiron_football_person/position"] = 5800, ["Infobox_gymnast"] = 3300, ["Infobox_handball_biography"] = 4800, ["Infobox_historic_site"] = 11000, ["Infobox_horseraces"] = 2600, ["Infobox_hospital"] = 6200, ["Infobox_hospital/care_system"] = 6200, ["Infobox_hospital/lists"] = 6200, ["Infobox_ice_hockey_biography"] = 20000, ["Infobox_ice_hockey_player"] = 19000, ["Infobox_ice_hockey_team"] = 3000, ["Infobox_ice_hockey_team_season"] = 2000, ["Infobox_international_football_competition"] = 5600, ["Infobox_islands"] = 8600, ["Infobox_islands/area"] = 9100, ["Infobox_islands/density"] = 9100, ["Infobox_islands/length"] = 8600, ["Infobox_islands/styles.css"] = 8600, ["Infobox_journal"] = 9600, ["Infobox_journal/Abbreviation_search"] = 9500, ["Infobox_journal/Bluebook_check"] = 9300, ["Infobox_journal/Former_check"] = 9300, ["Infobox_journal/ISO_4_check"] = 9300, ["Infobox_journal/ISSN-eISSN"] = 9400, ["Infobox_journal/Indexing_search"] = 9400, ["Infobox_journal/MathSciNet_check"] = 9300, ["Infobox_journal/NLM_check"] = 9300, ["Infobox_journal/frequency"] = 8500, ["Infobox_lake"] = 4500, ["Infobox_language"] = 9500, ["Infobox_language/family-color"] = 11000, ["Infobox_language/genetic"] = 6500, ["Infobox_language/linguistlist"] = 9500, ["Infobox_language/ref"] = 7100, ["Infobox_legislature"] = 3500, ["Infobox_library"] = 2100, ["Infobox_lighthouse"] = 2600, ["Infobox_lighthouse/light"] = 2600, ["Infobox_locomotive"] = 4800, ["Infobox_magazine"] = 7500, ["Infobox_manner_of_address"] = 3200, ["Infobox_mapframe"] = 79000, ["Infobox_martial_artist"] = 5500, ["Infobox_martial_artist/record"] = 5500, ["Infobox_medal_templates"] = 417000, ["Infobox_medical_condition"] = 10000, ["Infobox_medical_condition_(new)"] = 8200, ["Infobox_military_conflict"] = 21000, ["Infobox_military_installation"] = 9600, ["Infobox_military_person"] = 44000, ["Infobox_military_unit"] = 25000, ["Infobox_mine"] = 2100, ["Infobox_model"] = 2300, ["Infobox_mountain"] = 27000, ["Infobox_multi-sport_competition_event"] = 2200, ["Infobox_museum"] = 10000, ["Infobox_musical_artist"] = 120000, ["Infobox_musical_artist/color"] = 120000, ["Infobox_musical_artist/hCard_class"] = 309000, ["Infobox_musical_composition"] = 2800, ["Infobox_name"] = 7400, ["Infobox_name_module"] = 6400, ["Infobox_newspaper"] = 9400, ["Infobox_nobility"] = 2400, ["Infobox_noble"] = 7000, ["Infobox_officeholder"] = 209000, ["Infobox_officeholder/office"] = 214000, ["Infobox_official_post"] = 7800, ["Infobox_organization"] = 35000, ["Infobox_pageant_titleholder"] = 2800, ["Infobox_park"] = 7200, ["Infobox_person"] = 458000, ["Infobox_person/Wikidata"] = 5000, ["Infobox_person/height"] = 101000, ["Infobox_person/length"] = 7000, ["Infobox_person/weight"] = 65000, ["Infobox_philosopher"] = 3200, ["Infobox_planet"] = 4700, ["Infobox_play"] = 3800, ["Infobox_political_party"] = 14000, ["Infobox_power_station"] = 3000, ["Infobox_prepared_food"] = 3200, ["Infobox_professional_wrestler"] = 4200, ["Infobox_professional_wrestling_event"] = 2600, ["Infobox_protected_area"] = 14000, ["Infobox_protein_family"] = 2100, ["Infobox_publisher"] = 2400, ["Infobox_racehorse"] = 5500, ["Infobox_racing_driver"] = 3600, ["Infobox_radio_station"] = 22000, ["Infobox_rail"] = 2900, ["Infobox_rail_line"] = 7100, ["Infobox_rail_line/tracking"] = 7100, ["Infobox_rail_service"] = 2900, ["Infobox_rail_service/doc"] = 2900, ["Infobox_reality_competition_season"] = 3300, ["Infobox_record_label"] = 4000, ["Infobox_recurring_event"] = 6200, ["Infobox_religious_biography"] = 4900, ["Infobox_religious_building"] = 12000, ["Infobox_religious_building/color"] = 16000, ["Infobox_restaurant"] = 2300, ["Infobox_river"] = 30000, ["Infobox_river/calcunit"] = 30000, ["Infobox_river/discharge"] = 30000, ["Infobox_river/row-style"] = 30000, ["Infobox_river/source"] = 30000, ["Infobox_road"] = 24000, ["Infobox_road/meta/mask/category"] = 23000, ["Infobox_road/meta/mask/country"] = 24000, ["Infobox_road/styles.css"] = 25000, ["Infobox_road_small"] = 2300, ["Infobox_rockunit"] = 6400, ["Infobox_royalty"] = 21000, ["Infobox_royalty/short_description"] = 13000, ["Infobox_rugby_biography"] = 15000, ["Infobox_rugby_biography/correct_date"] = 15000, ["Infobox_rugby_biography/depcheck"] = 6800, ["Infobox_rugby_league_biography"] = 9900, ["Infobox_rugby_league_biography/PLAYER"] = 9800, ["Infobox_rugby_team"] = 2600, ["Infobox_sailboat_specifications"] = 2200, ["Infobox_saint"] = 4900, ["Infobox_school"] = 38000, ["Infobox_school/short_description"] = 38000, ["Infobox_school_district"] = 5600, ["Infobox_school_district/styles.css"] = 5600, ["Infobox_scientist"] = 47000, ["Infobox_service_record"] = 2500, ["Infobox_settlement"] = 555000, ["Infobox_settlement/areadisp"] = 232000, ["Infobox_settlement/columns"] = 92000, ["Infobox_settlement/columns/styles.css"] = 92000, ["Infobox_settlement/densdisp"] = 427000, ["Infobox_settlement/impus"] = 80000, ["Infobox_settlement/lengthdisp"] = 167000, ["Infobox_settlement/link"] = 92000, ["Infobox_settlement/metric"] = 206000, ["Infobox_settlement/pref"] = 287000, ["Infobox_settlement/styles.css"] = 555000, ["Infobox_ship_begin"] = 40000, ["Infobox_ship_career"] = 37000, ["Infobox_ship_characteristics"] = 40000, ["Infobox_ship_class_overview"] = 4100, ["Infobox_ship_image"] = 40000, ["Infobox_shopping_mall"] = 3400, ["Infobox_short_story"] = 2300, ["Infobox_skier"] = 2500, ["Infobox_soap_character"] = 2900, ["Infobox_software"] = 14000, ["Infobox_software/simple"] = 14000, ["Infobox_song"] = 74000, ["Infobox_song/color"] = 74000, ["Infobox_song/link"] = 74000, ["Infobox_spaceflight"] = 3500, ["Infobox_spaceflight/styles.css"] = 3500, ["Infobox_sport_event"] = 2000, ["Infobox_sports_competition_event"] = 16000, ["Infobox_sports_competition_event/medalrow"] = 11000, ["Infobox_sports_league"] = 4900, ["Infobox_sports_season"] = 5200, ["Infobox_sports_team"] = 2200, ["Infobox_sportsperson"] = 105000, ["Infobox_stadium"] = 3600, ["Infobox_station"] = 54000, ["Infobox_station/doc"] = 54000, ["Infobox_station/services"] = 54000, ["Infobox_station/styles.css"] = 54000, ["Infobox_street"] = 3300, ["Infobox_swimmer"] = 9300, ["Infobox_television"] = 56000, ["Infobox_television/Short_description"] = 54000, ["Infobox_television_channel"] = 6200, ["Infobox_television_episode"] = 11000, ["Infobox_television_episode/styles.css"] = 11000, ["Infobox_television_season"] = 9200, ["Infobox_television_station"] = 3700, ["Infobox_tennis_biography"] = 10000, ["Infobox_tennis_event"] = 2400, ["Infobox_tennis_tournament_event"] = 18000, ["Infobox_tennis_tournament_year"] = 9000, ["Infobox_tennis_tournament_year/color"] = 27000, ["Infobox_tennis_tournament_year/footer"] = 27000, ["Infobox_train"] = 2200, ["Infobox_tropical_cyclone"] = 2300, ["Infobox_union"] = 2200, ["Infobox_university"] = 26000, ["Infobox_user"] = 2600, ["Infobox_venue"] = 18000, ["Infobox_video_game"] = 27000, ["Infobox_video_game/styles.css"] = 27000, ["Infobox_volleyball_biography"] = 5200, ["Infobox_weapon"] = 7200, ["Infobox_website"] = 7700, ["Infobox_writer"] = 37000, ["Information"] = 104000, ["Information/styles.css"] = 104000, ["Inprogress"] = 2300, ["Input_link"] = 32000, ["Instagram"] = 10000, ["Interlanguage_link"] = 147000, ["Interlanguage_link_multi"] = 20000, ["Internet_Archive_author"] = 18000, ["Internet_Archive_film"] = 2500, ["Intitle"] = 11000, ["Invalid_SVG"] = 3800, ["Invalid_SVG/styles.css"] = 3800, ["Ipsock"] = 7800, ["Iptalk"] = 20000, ["IranCensus2006"] = 51000, ["IranNCSGN"] = 3200, ["Iran_Census_2006"] = 51000, ["Irc"] = 2100, ["Irish_place_name"] = 2600, ["IsIPAddress"] = 40000, ["IsValidPageName"] = 135000, ["Is_country_in_Central_America"] = 13000, ["Is_country_in_the_Caribbean"] = 14000, ["Is_interwiki_link"] = 6000, ["Is_italic_taxon"] = 461000, ["Is_redirect"] = 25000, ["Isbn"] = 7000, ["Isfdb_name"] = 4000, ["Isfdb_title"] = 4500, ["Isnumeric"] = 201000, ["Iso2continent"] = 33000, ["Iso2country"] = 23000, ["Iso2country/article"] = 22000, ["Iso2country/data"] = 23000, ["Iso2nationality"] = 218000, ["Issubst"] = 71000, ["Isu_name"] = 2300, ["Italic_dab2"] = 5100, ["Italic_title"] = 285000, ["Italic_title_prefixed"] = 8600, ["Italics_colon"] = 3400, ["Italictitle"] = 4400, ["Ivm"] = 5700, ["Ivm/styles.css"] = 5700, ["Ivmbox"] = 121000, ["Ivory_messagebox"] = 136000, ["Module:I18n/complex_date"] = 65000, ["Module:IP"] = 128000, ["Module:IPA_symbol"] = 4500, ["Module:IPA_symbol/data"] = 4500, ["Module:IPAc-en"] = 47000, ["Module:IPAc-en/data"] = 47000, ["Module:IPAc-en/phonemes"] = 47000, ["Module:IPAc-en/pronunciation"] = 47000, ["Module:IPAddress"] = 187000, ["Module:ISO_3166"] = 995000, ["Module:ISO_3166/data/AT"] = 2500, ["Module:ISO_3166/data/BA"] = 3400, ["Module:ISO_3166/data/CA"] = 2600, ["Module:ISO_3166/data/CN"] = 2100, ["Module:ISO_3166/data/DE"] = 14000, ["Module:ISO_3166/data/ES"] = 3600, ["Module:ISO_3166/data/FR"] = 38000, ["Module:ISO_3166/data/GB"] = 6300, ["Module:ISO_3166/data/GR"] = 3100, ["Module:ISO_3166/data/IN"] = 28000, ["Module:ISO_3166/data/IR"] = 2700, ["Module:ISO_3166/data/National"] = 995000, ["Module:ISO_3166/data/PL"] = 3100, ["Module:ISO_3166/data/RS"] = 3200, ["Module:ISO_3166/data/RU"] = 24000, ["Module:ISO_3166/data/US"] = 83000, ["Module:ISO_639_name"] = 14000, ["Module:ISOdate"] = 65000, ["Module:Icon"] = 566000, ["Module:Icon/data"] = 566000, ["Module:If_empty"] = 2950000, ["Module:If_in_page"] = 8200, ["Module:If_preview"] = 469000, ["Module:If_preview/configuration"] = 469000, ["Module:If_preview/styles.css"] = 469000, ["Module:Import_style"] = 10000, ["Module:In_lang"] = 350000, ["Module:Indent"] = 4200, ["Module:Infobox"] = 4020000, ["Module:Infobox/dates"] = 65000, ["Module:Infobox/styles.css"] = 4280000, ["Module:Infobox3cols"] = 292000, ["Module:InfoboxImage"] = 4320000, ["Module:Infobox_body_of_water_tracking"] = 17000, ["Module:Infobox_cyclist_tracking"] = 16000, ["Module:Infobox_gene"] = 13000, ["Module:Infobox_mapframe"] = 377000, ["Module:Infobox_military_conflict"] = 21000, ["Module:Infobox_military_conflict/styles.css"] = 21000, ["Module:Infobox_multi-lingual_name"] = 20000, ["Module:Infobox_multi-lingual_name/data"] = 20000, ["Module:Infobox_power_station"] = 3000, ["Module:Infobox_road"] = 25000, ["Module:Infobox_road/browselinks"] = 25000, ["Module:Infobox_road/errors"] = 24000, ["Module:Infobox_road/length"] = 25000, ["Module:Infobox_road/locations"] = 24000, ["Module:Infobox_road/map"] = 24000, ["Module:Infobox_road/route"] = 25000, ["Module:Infobox_road/sections"] = 24000, ["Module:Infobox_television"] = 56000, ["Module:Infobox_television_disambiguation_check"] = 62000, ["Module:Infobox_television_episode"] = 11000, ["Module:Infobox_television_season_disambiguation_check"] = 8700, ["Module:Infobox_television_season_name"] = 9200, ["Module:Internet_Archive"] = 18000, ["Module:IrelandByCountyCatNav"] = 2500, ["Module:Is_infobox_in_lead"] = 374000, ["Module:Is_instance"] = 8100, ["Module:Italic_title"] = 1090000, ["Module:Italic_title2"] = 5100, } 1b886d1f13737ca27de8ca4f5bc08cf3da282527 Module:If preview/doc 828 180 473 472 2023-03-27T13:46:06Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{Module rating|protected}} {{High-use}} {{Lua|Module:If preview/configuration}} {{Uses TemplateStyles|Module:If preview/styles.css}} This module implements {{tl|if preview}} and {{tl|preview warning}}. It helps templates/modules determine if they are being previewed. Prefer implementing the template versions in other templates. In a module to use the <code>main()</code>, you need to pass a frame table with an args table. For the preview warning, use <code>_warning()</code>. <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | <!-- Categories below this line, please; interwikis at Wikidata --> }}</includeonly> b3f3d514daf6896569d1eeaae47893b228163661 Home 0 1 474 441 2023-03-27T22:51:59Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the Library of World Assembly </b></big></big></center> <div class="three-boxes-container"> <div class="three-boxes-box"> <h2>World Assembly</h2> <p>'''<big>[[The World Assembly| World Assembly Resolutions]]</big>'''</p> <p> '''<big>[[The World Assembly| World Assembly Proclamations]]</big>'''</p> </div> <div class="three-boxes-box"> <h2>Security Council</h2> <p>'''<big>[[Security Council| Security Council Resolutions]]</big>'''</p> </div> <div class="three-boxes-box"> <h2>Court of Justice</h2> <p>'''<big>[[Court of Justice| Court Rulings]]</big>'''</p> </div> </div> <big> '''Record A WA Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''Resolution 0000'' preload=Archivarius:Record A Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> <big> '''Record A SC Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''SC Resolution 0000'' preload=Archivarius:Record A SC Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> 978c3156e3e1496363225b42f61251dc56a13773 World Assembly 0 64 475 438 2023-03-28T09:24:06Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = | houses = | chambers = | body = | jurisdiction = | term_limits | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = | leader1 = | leader1_term = | party1 = | election1 = | leader2_type = | leader2 = | party2 = | election2 = | leader2_term = | leader3_type = | leader3 = | party3 = | election3 = | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = 20 | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = 1 Month | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = 14 June 2022 | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = 12 April 2023 | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = | footnotes = }} 14486a0caeb8bab3f0185d65d3b4af6db91115fa 476 475 2023-03-28T09:43:04Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lind | leader1_term = | party1 = | election1 = 27 March 2023 | leader2_type = First Vice President | leader2 = Migaspin | party2 = | election2 = 27 March 2023 | leader2_term = | leader3_type = Second Vice President | leader3 = Collin Anderson | party3 = | election3 = 27 March 2023 | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Justice, Activity, Finance, Emeritus | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = [[https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing|World Assembly Procedures]] | footnotes = }} 7dfc57b25773bbb7042332afce0b38f67651ad1c 477 476 2023-03-28T09:44:30Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lind | leader1_term = | party1 = | election1 = 27 March 2023 | leader2_type = First Vice President | leader2 = Migaspin | party2 = | election2 = 27 March 2023 | leader2_term = | leader3_type = Second Vice President | leader3 = Collin Anderson | party3 = | election3 = 27 March 2023 | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Justice, Activity, Finance, Emeritus | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules =[[https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing|World Assembly Procedures]] | footnotes = }} 6455fe18766c21f6b7a31c94fd8842e1307c62af 478 477 2023-03-28T09:44:51Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lind | leader1_term = | party1 = | election1 = 27 March 2023 | leader2_type = First Vice President | leader2 = Migaspin | party2 = | election2 = 27 March 2023 | leader2_term = | leader3_type = Second Vice President | leader3 = Collin Anderson | party3 = | election3 = 27 March 2023 | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Justice, Activity, Finance, Emeritus | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules =[[https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing | World Assembly Procedures]] | footnotes = }} 6c85cd0028e69012b5e96b6dc63c961003e0bae0 479 478 2023-03-28T09:45:21Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lind | leader1_term = | party1 = | election1 = 27 March 2023 | leader2_type = First Vice President | leader2 = Migaspin | party2 = | election2 = 27 March 2023 | leader2_term = | leader3_type = Second Vice President | leader3 = Collin Anderson | party3 = | election3 = 27 March 2023 | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Justice, Activity, Finance, Emeritus | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = [[https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing| World Assembly Procedures]] | footnotes = }} 2e985c8b987c04ab9cc2dd977913fb28a4fb98b7 503 479 2023-03-28T13:03:06Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lind | leader1_term = | party1 = | election1 = 27 March 2023 | leader2_type = First Vice President | leader2 = Migaspin | party2 = | election2 = 27 March 2023 | leader2_term = | leader3_type = Second Vice President | leader3 = Collin Anderson | party3 = | election3 = 27 March 2023 | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Justice, Activity, Finance, Emeritus | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = [https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing World Assembly Procedures] | footnotes = }} 363ea3d86032177182fd934d0758dfecd9909987 504 503 2023-03-28T13:04:36Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lind | leader1_term = | party1 = | election1 = 27 March 2023 | leader2_type = First Vice President | leader2 = Migaspin | party2 = | election2 = 27 March 2023 | leader2_term = | leader3_type = Second Vice President | leader3 = Collin Anderson | party3 = | election3 = 27 March 2023 | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Justice, Activity, Finance, Emeritus | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = [https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing World Assembly Procedures] | footnotes = }} The '''League of Servers World Assembly''' is the main assembly of the League’s members consisting of delegates from all member servers. The World Assembly deliberates and passes resolutions on matters of international politics, conflict resolution, and other matters as the charter prescribes. 06df0181ba8f45ed826d371874a3e0322c97fdb5 505 504 2023-03-28T13:11:02Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lind | leader1_term = | party1 = | election1 = 27 March 2023 | leader2_type = First Vice President | leader2 = Migaspin | party2 = | election2 = 27 March 2023 | leader2_term = | leader3_type = Second Vice President | leader3 = Collin Anderson | party3 = | election3 = 27 March 2023 | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Justice, Activity, Finance, Emeritus | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = [https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing World Assembly Procedures] | footnotes = }} The '''League of Servers World Assembly''' is the main assembly of the League’s members consisting of delegates from all member servers. The World Assembly deliberates and passes resolutions on matters of international politics, conflict resolution, and other matters as the charter prescribes. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! <center>Elected</center> / Appointed by !! <center>Assumed office</center> |- || Regno Di Italia, Mathematics || Lind|| President || World Assembly || 27 March 2023 |- || Alethkar|| Migaspin|| First Vice President || World Assembly President || 27 March 2023 |- || The Principality of Cakeycollin || Collin Anderson || Second Vice President || World Assembly President || 27 March 2023 |} 6edb2954ea6d3e6ad0799720a9748228bec1fcb3 506 505 2023-03-28T13:13:16Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lind | leader1_term = | party1 = | election1 = 27 March 2023 | leader2_type = First Vice President | leader2 = Migaspin | party2 = | election2 = 27 March 2023 | leader2_term = | leader3_type = Second Vice President | leader3 = Collin Anderson | party3 = | election3 = 27 March 2023 | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Justice, Activity, Finance, Emeritus | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = [https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing World Assembly Procedures] | footnotes = }} The '''League of Servers World Assembly''' is the main assembly of the League’s members consisting of delegates from all member servers. The World Assembly deliberates and passes resolutions on matters of international politics, conflict resolution, and other matters as the charter prescribes. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! <center>Elected</center> / Appointed by !! <center>Assumed office</center> |- || Regno Di Italia, Mathematics || Lind|| President || World Assembly || 27 March 2023 |- || Alethkar|| Migaspin|| First Vice President || World Assembly President || 27 March 2023 |- || The Principality of Cakeycollin || Collin Anderson || Second Vice President || World Assembly President || 27 March 2023 |} == Resolutions == {| class="wikitable" style="text-align:center;" ! <center>Citation</center> !! <center>Title</center> !! <center>Summary</center> !! <center>Status</center> |- || WA/RES/21/0001 || [[WA Resolution 0001 (2022)|Activity, Economy Changes and Events]] || The World Assembly, recognizing the inactivity within the League of Servers, has enacted a resolution to revitalize the community through the establishment of a lottery employment system, creation of new lottery roles, modification of League Credits collection methods, adjustments to current product pricing, introduction of new products, and facilitating exchange of League Credits with member-servers' currencies. This resolution aims to boost engagement and participation within the League of Servers. || In Force |- || || || || |} 2fefcbbe6306a9eb1a0844414d24c68907bf6c73 511 506 2023-03-28T13:16:43Z 17ademoladav 2 /* Resolutions */ wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lind | leader1_term = | party1 = | election1 = 27 March 2023 | leader2_type = First Vice President | leader2 = Migaspin | party2 = | election2 = 27 March 2023 | leader2_term = | leader3_type = Second Vice President | leader3 = Collin Anderson | party3 = | election3 = 27 March 2023 | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Justice, Activity, Finance, Emeritus | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = [https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing World Assembly Procedures] | footnotes = }} The '''League of Servers World Assembly''' is the main assembly of the League’s members consisting of delegates from all member servers. The World Assembly deliberates and passes resolutions on matters of international politics, conflict resolution, and other matters as the charter prescribes. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! <center>Elected</center> / Appointed by !! <center>Assumed office</center> |- || Regno Di Italia, Mathematics || Lind|| President || World Assembly || 27 March 2023 |- || Alethkar|| Migaspin|| First Vice President || World Assembly President || 27 March 2023 |- || The Principality of Cakeycollin || Collin Anderson || Second Vice President || World Assembly President || 27 March 2023 |} == Resolutions == {| class="wikitable" style="text-align:center;" ! <center>Citation</center> !! <center>Title</center> !! <center>Summary</center> !! <center>Status</center> |- || WA/RES/21/0001 || [[WA Resolution 0001 (2022)|Activity, Economy Changes and Events]] || The World Assembly, recognizing the inactivity within the League of Servers, has enacted a resolution to revitalize the community through the establishment of a lottery employment system, creation of new lottery roles, modification of League Credits collection methods, adjustments to current product pricing, introduction of new products, and facilitating exchange of League Credits with member-servers' currencies. This resolution aims to boost engagement and participation within the League of Servers. || In Force |- || WA/RES/22/0002 || [[WA Resolution 0002 (2022)|The Right to Inspection]] || The World Assembly, acknowledging the threat of inactive servers hindering the inclusion of active and dynamic nations, enacts a resolution to establish the Activity Committee of the World Assembly. This committee, overseen by the President and Inspector General, will be responsible for visiting and verifying the activity of League servers. Servers must comply with League standards and welcome Activity Committee members for assessment. Non-compliant servers will be given a probationary period and may face expulsion from the League if improvements are not made. This resolution aims to maintain a high level of activity and engagement within the League of Servers. || In Force |} 25d6655fd675c65066fb86fd473b64e3a5d1e135 512 511 2023-03-28T13:17:02Z 17ademoladav 2 /* Resolutions */ wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lind | leader1_term = | party1 = | election1 = 27 March 2023 | leader2_type = First Vice President | leader2 = Migaspin | party2 = | election2 = 27 March 2023 | leader2_term = | leader3_type = Second Vice President | leader3 = Collin Anderson | party3 = | election3 = 27 March 2023 | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Justice, Activity, Finance, Emeritus | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = [https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing World Assembly Procedures] | footnotes = }} The '''League of Servers World Assembly''' is the main assembly of the League’s members consisting of delegates from all member servers. The World Assembly deliberates and passes resolutions on matters of international politics, conflict resolution, and other matters as the charter prescribes. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! <center>Elected</center> / Appointed by !! <center>Assumed office</center> |- || Regno Di Italia, Mathematics || Lind|| President || World Assembly || 27 March 2023 |- || Alethkar|| Migaspin|| First Vice President || World Assembly President || 27 March 2023 |- || The Principality of Cakeycollin || Collin Anderson || Second Vice President || World Assembly President || 27 March 2023 |} == Resolutions == {| class="wikitable" style="text-align:center;" ! <center>Citation</center> !! <center>Title</center> !! <center>Summary</center> !! <center>Status</center> |- || WA/RES/22/0001 || [[WA Resolution 0001 (2022)|Activity, Economy Changes and Events]] || The World Assembly, recognizing the inactivity within the League of Servers, has enacted a resolution to revitalize the community through the establishment of a lottery employment system, creation of new lottery roles, modification of League Credits collection methods, adjustments to current product pricing, introduction of new products, and facilitating exchange of League Credits with member-servers' currencies. This resolution aims to boost engagement and participation within the League of Servers. || In Force |- || WA/RES/22/0002 || [[WA Resolution 0002 (2022)|The Right to Inspection]] || The World Assembly, acknowledging the threat of inactive servers hindering the inclusion of active and dynamic nations, enacts a resolution to establish the Activity Committee of the World Assembly. This committee, overseen by the President and Inspector General, will be responsible for visiting and verifying the activity of League servers. Servers must comply with League standards and welcome Activity Committee members for assessment. Non-compliant servers will be given a probationary period and may face expulsion from the League if improvements are not made. This resolution aims to maintain a high level of activity and engagement within the League of Servers. || In Force |} 75f9c57e7e0987da365a1a7a997702e09754446a 514 512 2023-03-29T00:30:28Z Numa6442 9 /* Resolutions */ wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lind | leader1_term = | party1 = | election1 = 27 March 2023 | leader2_type = First Vice President | leader2 = Migaspin | party2 = | election2 = 27 March 2023 | leader2_term = | leader3_type = Second Vice President | leader3 = Collin Anderson | party3 = | election3 = 27 March 2023 | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Justice, Activity, Finance, Emeritus | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = [https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing World Assembly Procedures] | footnotes = }} The '''League of Servers World Assembly''' is the main assembly of the League’s members consisting of delegates from all member servers. The World Assembly deliberates and passes resolutions on matters of international politics, conflict resolution, and other matters as the charter prescribes. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! <center>Elected</center> / Appointed by !! <center>Assumed office</center> |- || Regno Di Italia, Mathematics || Lind|| President || World Assembly || 27 March 2023 |- || Alethkar|| Migaspin|| First Vice President || World Assembly President || 27 March 2023 |- || The Principality of Cakeycollin || Collin Anderson || Second Vice President || World Assembly President || 27 March 2023 |} == Resolutions == {| class="wikitable" style="text-align:center;" ! <center>Citation</center> !! <center>Title</center> !! <center>Summary</center> !! <center>Status</center> |- || WA/RES/21/0002 || [[WA Resolution 0002 (2021) |Calling for an End to the Usage of Gore in Discord Wars]]||The World Assembly, recognizing gore that's used on server-on-server wars/attacks, has enacted a resolution to make using gore a war crime. || In Force |- ||WA/RES/21/0003 ||[[WA Resolution 0003 (2021) |Condeming the 4th Brigade]]||The World Assembly, recognizing the attack on the Sith Empire by the 4th Brigade, has enacted a resolution on condeming the 4th. ||In Force |- ||WA/RES/22/0001||[[WA Resolution 0001 (2022)|Activity, Economy Changes and Events]]||The World Assembly, recognizing the inactivity within the League of Servers, has enacted a resolution to revitalize the community through the establishment of a lottery employment system, creation of new lottery roles, modification of League Credits collection methods, adjustments to current product pricing, introduction of new products, and facilitating exchange of League Credits with member-servers' currencies. This resolution aims to boost engagement and participation within the League of Servers.||In Force |- ||WA/RES/22/0002||[[WA Resolution 0002 (2022)|The Right to Inspection]] ||The World Assembly, acknowledging the threat of inactive servers hindering the inclusion of active and dynamic nations, enacts a resolution to establish the Activity Committee of the World Assembly. This committee, overseen by the President and Inspector General, will be responsible for visiting and verifying the activity of League servers. Servers must comply with League standards and welcome Activity Committee members for assessment. Non-compliant servers will be given a probationary period and may face expulsion from the League if improvements are not made. This resolution aims to maintain a high level of activity and engagement within the League of Servers.||In Force |} c622b1fc481e1980253e9b7ad2d609ab9dc6a4c0 517 514 2023-03-29T00:45:56Z Numa6442 9 wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lind | leader1_term = | party1 = | election1 = 27 March 2023 | leader2_type = First Vice President | leader2 = Migaspin | party2 = | election2 = 27 March 2023 | leader2_term = | leader3_type = Second Vice President | leader3 = Collin Anderson | party3 = | election3 = 27 March 2023 | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Justice, Activity, Finance, Emeritus | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = [https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing World Assembly Procedures] | footnotes = }} The '''League of Servers World Assembly''' is the main assembly of the League’s members consisting of delegates from all member servers. The World Assembly deliberates and passes resolutions on matters of international politics, conflict resolution, and other matters as the charter prescribes. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! <center>Elected</center> / Appointed by !! <center>Assumed office</center> |- || Regno Di Italia, Mathematics || Lind|| President || World Assembly || 27 March 2023 |- || Alethkar|| Migaspin|| First Vice President || World Assembly President || 27 March 2023 |- || The Principality of Cakeycollin || Collin Anderson || Second Vice President || World Assembly President || 27 March 2023 |} == Resolutions == {| class="wikitable" style="text-align:center;" ! <center>Citation</center> !! <center>Title</center> !! <center>Summary</center> !! <center>Status</center> |- || WA/RES/21/0002 || [[WA Resolution 0002 (2021) |Calling for an End to the Usage of Gore in Discord Wars]]||The World Assembly, recognizing gore that's used on server-on-server wars/attacks, has enacted a resolution to make using gore a war crime. || In Force |- ||WA/RES/21/0003 ||[[WA Resolution 0003 (2021) |Condeming the 4th Brigade]]||The World Assembly, recognizing the attack on the Sith Empire by the 4th Brigade, has enacted a resolution on condeming the 4th. ||In Force |- ||WA/RES/21/0004||[[WA Resolution 0004 (2021) |Establishing International Awards]]||The World Assembly, realizing that some people and/or member nations have made outstanding contributions to League of Servers, have enacted a resolution establishing eight rewards to give. Along with establishing the Awards Committee within' the World Assembly||In Force |- ||WA/RES/21/0009||[[WA Resolution 0009 (2021) |Establishing an Emergency Security Council]]||The World Assembly, deeply desturbed by attacks and nukes on member servers, alarmed by the lack of discussion & recent action among the Security Council, to seek cooperation & coordination to protect the league, and its members from further hostilities. Enacts a resolution to established a fifthteen member Emergency Security Council created by the Secretary General, who will be granted power and authority of the Security Council on matters of peace and security.||Unknown - Likely defunct |- ||WA/RES/22/0001||[[WA Resolution 0001 (2022)|Activity, Economy Changes and Events]]||The World Assembly, recognizing the inactivity within the League of Servers, has enacted a resolution to revitalize the community through the establishment of a lottery employment system, creation of new lottery roles, modification of League Credits collection methods, adjustments to current product pricing, introduction of new products, and facilitating exchange of League Credits with member-servers' currencies. This resolution aims to boost engagement and participation within the League of Servers.||In Force |- ||WA/RES/22/0002||[[WA Resolution 0002 (2022)|The Right to Inspection]]||The World Assembly, acknowledging the threat of inactive servers hindering the inclusion of active and dynamic nations, enacts a resolution to establish the Activity Committee of the World Assembly. This committee, overseen by the President and Inspector General, will be responsible for visiting and verifying the activity of League servers. Servers must comply with League standards and welcome Activity Committee members for assessment. Non-compliant servers will be given a probationary period and may face expulsion from the League if improvements are not made. This resolution aims to maintain a high level of activity and engagement within the League of Servers.||In Force |} 28ac3b1b51f48841feb5620e1dcb7c972ba3c19d Security Council 0 166 480 442 2023-03-28T09:48:46Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = Security Council | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = Chairman | leader1 = Wellington | leader1_term = | party1 = | election1 = 18 March 2023 | leader2_type = | leader2 = | party2 = | election2 = | leader2_term = | leader3_type = | leader3 = | party3 = | election3 = | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = 20 | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = 1 Month | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = 14 June 2022 | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = 12 April 2023 | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = | footnotes = }} 8209db233a283dd580ce7eb0f9192c571283b61d 481 480 2023-03-28T09:54:47Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = Security Council | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = Chairman | leader1 = Wellington | leader1_term = | party1 = | election1 = 18 March 2023 | leader2_type = Vice Chairman | leader2 = Sellout | party2 = | election2 = 18 March 2023 | leader2_term = | leader3_type = | leader3 = | party3 = | election3 = | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = 20 | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = 1 Month | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = 14 June 2022 | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = 12 April 2023 | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = | footnotes = }} The '''Security Council of the League of Servers''' is responsible for deliberating and deciding on matters of International Security. In order to ensure a swift and effective response to situations by the League, the Security Council is authorized to act on behalf of all of the League’s members. 734271064ed33910a297948f7b0551b517a639d0 482 481 2023-03-28T10:07:46Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = Security Council | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = Chairman | leader1 = Wellington | leader1_term = | party1 = | election1 = 18 March 2023 | leader2_type = Vice Chairman | leader2 = Sellout | party2 = | election2 = 18 March 2023 | leader2_term = | leader3_type = | leader3 = | party3 = | election3 = | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = 20 | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = 1 Month | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = 14 June 2022 | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = 12 April 2023 | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = | footnotes = }} The '''Security Council of the League of Servers''' is responsible for deliberating and deciding on matters of International Security. In order to ensure a swift and effective response to situations by the League, the Security Council is authorized to act on behalf of all of the League’s members. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! Elected / Appointed by !! <center>Assumed office</center> |- || United Kingdom of Great Britain and Ireland || Wellington || Chairman || Security Council || 18 March 2023 |- |} 9a107a78b7d99a76c4a3f5061129ca6cec279221 483 482 2023-03-28T12:27:20Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = Security Council | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = Chairman | leader1 = Wellington | leader1_term = | party1 = | election1 = 18 March 2023 | leader2_type = Vice Chairman | leader2 = Sellout | party2 = | election2 = 18 March 2023 | leader2_term = | leader3_type = | leader3 = | party3 = | election3 = | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = 20 | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = 1 Month | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = 14 June 2022 | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = 12 April 2023 | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = | footnotes = }} The '''Security Council of the League of Servers''' is responsible for deliberating and deciding on matters of International Security. In order to ensure a swift and effective response to situations by the League, the Security Council is authorized to act on behalf of all of the League’s members. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! Elected / Appointed by !! <center>Assumed office</center> |- || United Kingdom of Great Britain and Ireland || Wellington || Chairman || Security Council || 18 March 2023 |- || || Sellout || Vice Chairman || Security Council Chairman || 18 March 2023 |} 4f47a7cdd7257c1c78b26e3823b19aa4b7e9dcda 484 483 2023-03-28T12:27:47Z 17ademoladav 2 /* Presiding Officers */ wikitext text/x-wiki {{Infobox legislature | name = Security Council | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = Chairman | leader1 = Wellington | leader1_term = | party1 = | election1 = 18 March 2023 | leader2_type = Vice Chairman | leader2 = Sellout | party2 = | election2 = 18 March 2023 | leader2_term = | leader3_type = | leader3 = | party3 = | election3 = | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = 20 | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = 1 Month | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = 14 June 2022 | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = 12 April 2023 | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = | footnotes = }} The '''Security Council of the League of Servers''' is responsible for deliberating and deciding on matters of International Security. In order to ensure a swift and effective response to situations by the League, the Security Council is authorized to act on behalf of all of the League’s members. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! Elected / Appointed by !! <center>Assumed office</center> |- || United Kingdom of Great Britain and Ireland || Wellington || Chairman || Security Council || 18 March 2023 |- || QuebecSim || Sellout || Vice Chairman || Security Council Chairman || 18 March 2023 |} 5f04c24211ff37efb07366e91f60b5b36cd7f650 486 484 2023-03-28T12:45:04Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = Security Council | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = Chairman | leader1 = Wellington | leader1_term = | party1 = | election1 = 18 March 2023 | leader2_type = Vice Chairman | leader2 = Sellout | party2 = | election2 = 18 March 2023 | leader2_term = | leader3_type = | leader3 = | party3 = | election3 = | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = 20 | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = 1 Month | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = 14 June 2022 | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = 12 April 2023 | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = | footnotes = }} The '''Security Council of the League of Servers''' is responsible for deliberating and deciding on matters of International Security. In order to ensure a swift and effective response to situations by the League, the Security Council is authorized to act on behalf of all of the League’s members. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! <center>Elected</center> / Appointed by !! <center>Assumed office</center> |- || United Kingdom of Great Britain and Ireland || Wellington || Chairman || Security Council || 18 March 2023 |- || QuebecSim || Sellout || Vice Chairman || Security Council Chairman || 18 March 2023 |} == Resolutions == {| class="wikitable" style="text-align:center;" ! <center>Citation</center> !! <center>Title</center> !! <center>Summary</center> !! <center>Status</center> |- || SC/RES/21/0001 || [[SC Resolution 0001 (2021)|Condemn Flewencedale]] || || || |- || || || || || |} 97086a51e7e044b2ed6e7a1b8b2cea840caf2579 487 486 2023-03-28T12:47:26Z 17ademoladav 2 /* Resolutions */ wikitext text/x-wiki {{Infobox legislature | name = Security Council | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = Chairman | leader1 = Wellington | leader1_term = | party1 = | election1 = 18 March 2023 | leader2_type = Vice Chairman | leader2 = Sellout | party2 = | election2 = 18 March 2023 | leader2_term = | leader3_type = | leader3 = | party3 = | election3 = | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = 20 | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = 1 Month | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = 14 June 2022 | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = 12 April 2023 | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = | footnotes = }} The '''Security Council of the League of Servers''' is responsible for deliberating and deciding on matters of International Security. In order to ensure a swift and effective response to situations by the League, the Security Council is authorized to act on behalf of all of the League’s members. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! <center>Elected</center> / Appointed by !! <center>Assumed office</center> |- || United Kingdom of Great Britain and Ireland || Wellington || Chairman || Security Council || 18 March 2023 |- || QuebecSim || Sellout || Vice Chairman || Security Council Chairman || 18 March 2023 |} == Resolutions == {| class="wikitable" style="text-align:center;" ! <center>Citation</center> !! <center>Title</center> !! <center>Summary</center> !! <center>Status</center> |- || SC/RES/21/0001 || [[SC Resolution 0001 (2021)|Condemn Flewencedale]] || The Security Council expresses its horror at the recent nuclear attack on the Soviet Roman Reich, an LOS member, and identifies Flewencedale as the responsible aggressor. The Council notes the ongoing state of war between the two nations and supports the deployment of the LOS Quick Reaction Force to aid in the defense and reconstruction of the Soviet Roman Reich. In light of these events, the Security Council officially condemns Flewencedale and hopes for a peaceful resolution to the conflict. || In Force |- || || || || || |} 823924cb6d7cd5145bc623dcbfa2ab39f6d8694f 488 487 2023-03-28T12:47:52Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = Security Council | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = Chairman | leader1 = Wellington | leader1_term = | party1 = | election1 = 18 March 2023 | leader2_type = Vice Chairman | leader2 = Sellout | party2 = | election2 = 18 March 2023 | leader2_term = | leader3_type = | leader3 = | party3 = | election3 = | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = 20 | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = 1 Month | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = 14 June 2022 | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = 12 April 2023 | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = | footnotes = }} The '''Security Council of the League of Servers''' is responsible for deliberating and deciding on matters of International Security. In order to ensure a swift and effective response to situations by the League, the Security Council is authorized to act on behalf of all of the League’s members. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! <center>Elected</center> / Appointed by !! <center>Assumed office</center> |- || United Kingdom of Great Britain and Ireland || Wellington || Chairman || Security Council || 18 March 2023 |- || QuebecSim || Sellout || Vice Chairman || Security Council Chairman || 18 March 2023 |} == Resolutions == {| class="wikitable" style="text-align:center;" ! <center>Citation</center> !! <center>Title</center> !! <center>Summary</center> !! <center>Status</center> |- || SC/RES/21/0001 || [[SC Resolution 0001 (2021)|Condemn Flewencedale]] || The Security Council expresses its horror at the recent nuclear attack on the Soviet Roman Reich, an LOS member, and identifies Flewencedale as the responsible aggressor. The Council notes the ongoing state of war between the two nations and supports the deployment of the LOS Quick Reaction Force to aid in the defense and reconstruction of the Soviet Roman Reich. In light of these events, the Security Council officially condemns Flewencedale and hopes for a peaceful resolution to the conflict. || In Force |- || || || || |} 9b40a2e703de1229b4738dcd7e029af4ce9702a5 SC Resolution 0001 (2021) 0 168 485 415 2023-03-28T12:42:23Z 17ademoladav 2 17ademoladav moved page [[SC Resolution 0001]] to [[SC Resolution 0001 (2021)]] without leaving a redirect wikitext text/x-wiki == Resolution Information == Title: Condemn Flewencedale Citation: LOS/SC/RES/0001 Votes For: 4 Votes Against: 0 Votes Abstaining: 0 Status: {{font color|green|In Effect}} == Text == ''The Security Council,'' '''''Horrified''''' by the recent nuclear attack on the Soviet Roman Reich (LOS member), '''''Observing''''' that according to all available evidence, the nation of Flewencedale was responsible for ordering and carrying out the aforementioned attack, '''''Shocked''''' by the fact that despite the nuke, Flewencedale has decided to continue the war and has reaffirmed its hostile status to the Soviet Roman Reich, '''''Noting''''' that a state of war currently exists between the two nations, '''''Maintaining''''' its position that the nation of Flewencedale is the aggressor in this war, '''''Acknowledging''''' the necessity of the LOS Quick Reaction Force’s deployment to assist in the defence and reconstruction of the Soviet Roman Reich, '''''Hopeful''''' for a peaceful resolution to this conflict '''Hereby condemns Flewencedale.''' e921c0bb0cc4ef58d4dab8c13bf40011645b730c SC Resolution 002 (2021) 0 183 494 2023-03-28T12:55:41Z 17ademoladav 2 Created page with "{{Infobox legislation |short_title = SC/RES/21/002: Project Maginot |legislature = Security Council |image = File:Los.png |imagesize = 180px |image_upright = |imagealt = |caption = |citation = SC/RES/21/0001 |enacted_by = Security Council |date_enacted = 23 April 2022 |administered_by = League of Servers Secretariat |summary..." wikitext text/x-wiki {{Infobox legislation |short_title = SC/RES/21/002: Project Maginot |legislature = Security Council |image = File:Los.png |imagesize = 180px |image_upright = |imagealt = |caption = |citation = SC/RES/21/0001 |enacted_by = Security Council |date_enacted = 23 April 2022 |administered_by = League of Servers Secretariat |summary = The World Assembly, recognizing the inactivity within the League of Servers, has enacted a resolution to revitalize the community through the establishment of a lottery employment system, creation of new lottery roles, modification of League Credits collection methods, adjustments to current product pricing, introduction of new products, and facilitating exchange of League Credits with member-servers' currencies. This resolution aims to boost engagement and participation within the League of Servers. |keywords = |status = Not Passed }} d3fd236b8d61a17bc70bf92e35eb37e2ac2bdc72 495 494 2023-03-28T12:56:35Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislation |short_title = SC/RES/21/002: Project Maginot |legislature = Security Council |image = File:Los.png |imagesize = 180px |image_upright = |imagealt = |caption = |citation = SC/RES/21/0001 |enacted_by = Security Council |date_enacted = |administered_by = League of Servers Secretariat |summary = The Security Council recalls past conflicts with The Authority and the effectiveness of the LoS coalition forces. To proactively defend against potential future aggression, the Council proposes the collective defensive project "Maginot." This project will be implemented in LOS member nations with more than 100 members and will require participating nations to ban potential nuke bots linked to The Authority, report discovered nuke bots to the League, and disclose information about their own nuclear programs, which will remain confidential. The Security Council hereby initiates Project Maginot to strengthen defense against possible threats from The Authority. |keywords = |status = Not Passed }} 750588a87da46bfeb43be812c349ea65a1f177f8 WA Resolution 0001 (2022) 0 72 496 429 2023-03-28T12:57:02Z 17ademoladav 2 17ademoladav moved page [[Resolution 0001]] to [[WA Resolution 0001 (2021)]] without leaving a redirect wikitext text/x-wiki {{Infobox legislation |short_title = WA/RES/001: Activity, Economy Changes and Events |legislature = World Assembly |image = File:Los.png |imagesize = 180px |image_upright = |imagealt = |caption = |citation = WA/RES/0001 |enacted_by = World Assembly |date_enacted = 23 April 2022 |administered_by = League of Servers Secretariat |summary = The World Assembly, recognizing the inactivity within the League of Servers, has enacted a resolution to revitalize the community through the establishment of a lottery employment system, creation of new lottery roles, modification of League Credits collection methods, adjustments to current product pricing, introduction of new products, and facilitating exchange of League Credits with member-servers' currencies. This resolution aims to boost engagement and participation within the League of Servers. |keywords = |status = In Force }} '''The World Assembly, including the President, the Vice Presidents and all delegates,''' ''Realizing'' that the League of Servers became very inactive, ''Hereby enacts the followings:'' '''Establishment''' of a new Lottery employment, '''Establishment''' of new Lottery roles for employees, '''Modifying''' current ways and establishing new ways to collect League Credits, '''Modifying''' current prices on current products which can be bought with League Credits, '''Making''' new products which can be bought with League Credits, '''Making''' League Credits exchangable to all member-servers’ own currency (system will be finished later) And stays resolved on the same. 5104e80bd8ff9f6aaef53dbc46517f69275f40fe 497 496 2023-03-28T13:00:31Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislation |short_title = WA/RES/22/001: Activity, Economy Changes and Events |legislature = World Assembly |image = File:Los.png |imagesize = 180px |image_upright = |imagealt = |caption = |citation = WA/RES/22/0001 |enacted_by = World Assembly |date_enacted = 23 April 2022 |administered_by = League of Servers Secretariat |summary = The World Assembly, recognizing the inactivity within the League of Servers, has enacted a resolution to revitalize the community through the establishment of a lottery employment system, creation of new lottery roles, modification of League Credits collection methods, adjustments to current product pricing, introduction of new products, and facilitating exchange of League Credits with member-servers' currencies. This resolution aims to boost engagement and participation within the League of Servers. |keywords = |status = In Force }} '''The World Assembly, including the President, the Vice Presidents and all delegates,''' ''Realizing'' that the League of Servers became very inactive, ''Hereby enacts the followings:'' '''Establishment''' of a new Lottery employment, '''Establishment''' of new Lottery roles for employees, '''Modifying''' current ways and establishing new ways to collect League Credits, '''Modifying''' current prices on current products which can be bought with League Credits, '''Making''' new products which can be bought with League Credits, '''Making''' League Credits exchangable to all member-servers’ own currency (system will be finished later) And stays resolved on the same. 71266de0cca3f9199d5c82239494c9733ec39fa5 498 497 2023-03-28T13:00:41Z 17ademoladav 2 17ademoladav moved page [[WA Resolution 0001 (2021)]] to [[WA Resolution 0001 (2022)]] wikitext text/x-wiki {{Infobox legislation |short_title = WA/RES/22/001: Activity, Economy Changes and Events |legislature = World Assembly |image = File:Los.png |imagesize = 180px |image_upright = |imagealt = |caption = |citation = WA/RES/22/0001 |enacted_by = World Assembly |date_enacted = 23 April 2022 |administered_by = League of Servers Secretariat |summary = The World Assembly, recognizing the inactivity within the League of Servers, has enacted a resolution to revitalize the community through the establishment of a lottery employment system, creation of new lottery roles, modification of League Credits collection methods, adjustments to current product pricing, introduction of new products, and facilitating exchange of League Credits with member-servers' currencies. This resolution aims to boost engagement and participation within the League of Servers. |keywords = |status = In Force }} '''The World Assembly, including the President, the Vice Presidents and all delegates,''' ''Realizing'' that the League of Servers became very inactive, ''Hereby enacts the followings:'' '''Establishment''' of a new Lottery employment, '''Establishment''' of new Lottery roles for employees, '''Modifying''' current ways and establishing new ways to collect League Credits, '''Modifying''' current prices on current products which can be bought with League Credits, '''Making''' new products which can be bought with League Credits, '''Making''' League Credits exchangable to all member-servers’ own currency (system will be finished later) And stays resolved on the same. 71266de0cca3f9199d5c82239494c9733ec39fa5 500 498 2023-03-28T13:01:30Z 17ademoladav 2 17ademoladav moved page [[WA Resolution 0001 (2022)]] to [[WA Resolution 0001 (2021)]] over redirect: revert wikitext text/x-wiki {{Infobox legislation |short_title = WA/RES/22/001: Activity, Economy Changes and Events |legislature = World Assembly |image = File:Los.png |imagesize = 180px |image_upright = |imagealt = |caption = |citation = WA/RES/22/0001 |enacted_by = World Assembly |date_enacted = 23 April 2022 |administered_by = League of Servers Secretariat |summary = The World Assembly, recognizing the inactivity within the League of Servers, has enacted a resolution to revitalize the community through the establishment of a lottery employment system, creation of new lottery roles, modification of League Credits collection methods, adjustments to current product pricing, introduction of new products, and facilitating exchange of League Credits with member-servers' currencies. This resolution aims to boost engagement and participation within the League of Servers. |keywords = |status = In Force }} '''The World Assembly, including the President, the Vice Presidents and all delegates,''' ''Realizing'' that the League of Servers became very inactive, ''Hereby enacts the followings:'' '''Establishment''' of a new Lottery employment, '''Establishment''' of new Lottery roles for employees, '''Modifying''' current ways and establishing new ways to collect League Credits, '''Modifying''' current prices on current products which can be bought with League Credits, '''Making''' new products which can be bought with League Credits, '''Making''' League Credits exchangable to all member-servers’ own currency (system will be finished later) And stays resolved on the same. 71266de0cca3f9199d5c82239494c9733ec39fa5 502 500 2023-03-28T13:01:44Z 17ademoladav 2 17ademoladav moved page [[WA Resolution 0001 (2021)]] to [[WA Resolution 0001 (2022)]] over a redirect without leaving a redirect wikitext text/x-wiki {{Infobox legislation |short_title = WA/RES/22/001: Activity, Economy Changes and Events |legislature = World Assembly |image = File:Los.png |imagesize = 180px |image_upright = |imagealt = |caption = |citation = WA/RES/22/0001 |enacted_by = World Assembly |date_enacted = 23 April 2022 |administered_by = League of Servers Secretariat |summary = The World Assembly, recognizing the inactivity within the League of Servers, has enacted a resolution to revitalize the community through the establishment of a lottery employment system, creation of new lottery roles, modification of League Credits collection methods, adjustments to current product pricing, introduction of new products, and facilitating exchange of League Credits with member-servers' currencies. This resolution aims to boost engagement and participation within the League of Servers. |keywords = |status = In Force }} '''The World Assembly, including the President, the Vice Presidents and all delegates,''' ''Realizing'' that the League of Servers became very inactive, ''Hereby enacts the followings:'' '''Establishment''' of a new Lottery employment, '''Establishment''' of new Lottery roles for employees, '''Modifying''' current ways and establishing new ways to collect League Credits, '''Modifying''' current prices on current products which can be bought with League Credits, '''Making''' new products which can be bought with League Credits, '''Making''' League Credits exchangable to all member-servers’ own currency (system will be finished later) And stays resolved on the same. 71266de0cca3f9199d5c82239494c9733ec39fa5 WA Resolution 0002 (2022) 0 73 507 430 2023-03-28T13:14:57Z 17ademoladav 2 17ademoladav moved page [[Resolution 0002]] to [[WA Resolution 0002 (2022)]] wikitext text/x-wiki {{Infobox legislation |short_title = WA/RES/002: The Right to Inspection |legislature = World Assembly |image = File:Los.png |imagesize = 180px |image_upright = |imagealt = |caption = |citation = WA/RES/0002 |enacted_by = World Assembly |date_enacted = 23 April 2022 |administered_by = League of Servers Secretariat |summary = The World Assembly, acknowledging the threat of inactive servers hindering the inclusion of active and dynamic nations, enacts a resolution to establish the Activity Committee of the World Assembly. This committee, overseen by the President and Inspector General, will be responsible for visiting and verifying the activity of League servers. Servers must comply with League standards and welcome Activity Committee members for assessment. Non-compliant servers will be given a probationary period and may face expulsion from the League if improvements are not made. This resolution aims to maintain a high level of activity and engagement within the League of Servers. |keywords = |status = In Force }} '''The World Assembly,''' ''Recognizing'' that the threat of innactive servers preventing the entry and inclusion of active and dynamic nations from joining the League, hereby enacts the following: '''The Establishment of the Activity Committee of the World Assembly''', to be overseen by the President and the Inspector General, and with the purpose of visiting and confirming the activity of all servers of the League; '''If requested''', all servers must welcome a designated member of the Commitee so that they may certify the activity and compliance with the League standards within the Community; '''Members of the Committee''' must be Delegates from Servers which were certified as active in the past six (6) months; '''Servers that don’t comply''' with the League standards or refuse to welcome a member of the Activity Committee are to be given three (3) days to enact the necessary changes. If such doesn’t happen, the Server will be given one (1) week to change its policy, in which time they will be considered “on Probation”; '''Servers “on Probation”''' do not have voting rights nor can run for office in the League. If they are members of a Committee, their membership will be suspended. The Server reserves the right to call for the help of the Plead to Defend signatary Servers and issue emergency reports; '''If no change in policy''' is taken by a Server “on Probation” after the designated time, the Security Council may take a vote to expell the Server from the League. And stays resolved on the same. 9c4c4b6c49e8ccc05e05fff53e51ee814f91dbb7 509 507 2023-03-28T13:15:06Z 17ademoladav 2 17ademoladav moved page [[WA Resolution 0002 (2022)]] to [[Resolution 0002]] over a redirect without leaving a redirect: revert wikitext text/x-wiki {{Infobox legislation |short_title = WA/RES/002: The Right to Inspection |legislature = World Assembly |image = File:Los.png |imagesize = 180px |image_upright = |imagealt = |caption = |citation = WA/RES/0002 |enacted_by = World Assembly |date_enacted = 23 April 2022 |administered_by = League of Servers Secretariat |summary = The World Assembly, acknowledging the threat of inactive servers hindering the inclusion of active and dynamic nations, enacts a resolution to establish the Activity Committee of the World Assembly. This committee, overseen by the President and Inspector General, will be responsible for visiting and verifying the activity of League servers. Servers must comply with League standards and welcome Activity Committee members for assessment. Non-compliant servers will be given a probationary period and may face expulsion from the League if improvements are not made. This resolution aims to maintain a high level of activity and engagement within the League of Servers. |keywords = |status = In Force }} '''The World Assembly,''' ''Recognizing'' that the threat of innactive servers preventing the entry and inclusion of active and dynamic nations from joining the League, hereby enacts the following: '''The Establishment of the Activity Committee of the World Assembly''', to be overseen by the President and the Inspector General, and with the purpose of visiting and confirming the activity of all servers of the League; '''If requested''', all servers must welcome a designated member of the Commitee so that they may certify the activity and compliance with the League standards within the Community; '''Members of the Committee''' must be Delegates from Servers which were certified as active in the past six (6) months; '''Servers that don’t comply''' with the League standards or refuse to welcome a member of the Activity Committee are to be given three (3) days to enact the necessary changes. If such doesn’t happen, the Server will be given one (1) week to change its policy, in which time they will be considered “on Probation”; '''Servers “on Probation”''' do not have voting rights nor can run for office in the League. If they are members of a Committee, their membership will be suspended. The Server reserves the right to call for the help of the Plead to Defend signatary Servers and issue emergency reports; '''If no change in policy''' is taken by a Server “on Probation” after the designated time, the Security Council may take a vote to expell the Server from the League. And stays resolved on the same. 9c4c4b6c49e8ccc05e05fff53e51ee814f91dbb7 510 509 2023-03-28T13:15:29Z 17ademoladav 2 17ademoladav moved page [[Resolution 0002]] to [[WA Resolution 0002 (2022)]] without leaving a redirect wikitext text/x-wiki {{Infobox legislation |short_title = WA/RES/002: The Right to Inspection |legislature = World Assembly |image = File:Los.png |imagesize = 180px |image_upright = |imagealt = |caption = |citation = WA/RES/0002 |enacted_by = World Assembly |date_enacted = 23 April 2022 |administered_by = League of Servers Secretariat |summary = The World Assembly, acknowledging the threat of inactive servers hindering the inclusion of active and dynamic nations, enacts a resolution to establish the Activity Committee of the World Assembly. This committee, overseen by the President and Inspector General, will be responsible for visiting and verifying the activity of League servers. Servers must comply with League standards and welcome Activity Committee members for assessment. Non-compliant servers will be given a probationary period and may face expulsion from the League if improvements are not made. This resolution aims to maintain a high level of activity and engagement within the League of Servers. |keywords = |status = In Force }} '''The World Assembly,''' ''Recognizing'' that the threat of innactive servers preventing the entry and inclusion of active and dynamic nations from joining the League, hereby enacts the following: '''The Establishment of the Activity Committee of the World Assembly''', to be overseen by the President and the Inspector General, and with the purpose of visiting and confirming the activity of all servers of the League; '''If requested''', all servers must welcome a designated member of the Commitee so that they may certify the activity and compliance with the League standards within the Community; '''Members of the Committee''' must be Delegates from Servers which were certified as active in the past six (6) months; '''Servers that don’t comply''' with the League standards or refuse to welcome a member of the Activity Committee are to be given three (3) days to enact the necessary changes. If such doesn’t happen, the Server will be given one (1) week to change its policy, in which time they will be considered “on Probation”; '''Servers “on Probation”''' do not have voting rights nor can run for office in the League. If they are members of a Committee, their membership will be suspended. The Server reserves the right to call for the help of the Plead to Defend signatary Servers and issue emergency reports; '''If no change in policy''' is taken by a Server “on Probation” after the designated time, the Security Council may take a vote to expell the Server from the League. And stays resolved on the same. 9c4c4b6c49e8ccc05e05fff53e51ee814f91dbb7 513 510 2023-03-28T13:17:16Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislation |short_title = WA/RES/002: The Right to Inspection |legislature = World Assembly |image = File:Los.png |imagesize = 180px |image_upright = |imagealt = |caption = |citation = WA/RES/0002 |enacted_by = World Assembly |date_enacted = 24 June 2022 |administered_by = League of Servers Secretariat |summary = The World Assembly, acknowledging the threat of inactive servers hindering the inclusion of active and dynamic nations, enacts a resolution to establish the Activity Committee of the World Assembly. This committee, overseen by the President and Inspector General, will be responsible for visiting and verifying the activity of League servers. Servers must comply with League standards and welcome Activity Committee members for assessment. Non-compliant servers will be given a probationary period and may face expulsion from the League if improvements are not made. This resolution aims to maintain a high level of activity and engagement within the League of Servers. |keywords = |status = In Force }} '''The World Assembly,''' ''Recognizing'' that the threat of innactive servers preventing the entry and inclusion of active and dynamic nations from joining the League, hereby enacts the following: '''The Establishment of the Activity Committee of the World Assembly''', to be overseen by the President and the Inspector General, and with the purpose of visiting and confirming the activity of all servers of the League; '''If requested''', all servers must welcome a designated member of the Commitee so that they may certify the activity and compliance with the League standards within the Community; '''Members of the Committee''' must be Delegates from Servers which were certified as active in the past six (6) months; '''Servers that don’t comply''' with the League standards or refuse to welcome a member of the Activity Committee are to be given three (3) days to enact the necessary changes. If such doesn’t happen, the Server will be given one (1) week to change its policy, in which time they will be considered “on Probation”; '''Servers “on Probation”''' do not have voting rights nor can run for office in the League. If they are members of a Committee, their membership will be suspended. The Server reserves the right to call for the help of the Plead to Defend signatary Servers and issue emergency reports; '''If no change in policy''' is taken by a Server “on Probation” after the designated time, the Security Council may take a vote to expell the Server from the League. And stays resolved on the same. 57a822df9ff883c37317db71e61f60fc16dd9232 WA Resolution 0002 (2021) 0 187 515 2023-03-29T00:31:35Z Numa6442 9 Created page with "The World Assembly, ''Horrified'' by the recent usage of gore in attacks, ''Concerned'' that other servers may do the same, ''Highlighting'' that this is a barbaric way of fighting wars, ''Acknowledging'' the amount of minors and other vulnerable groups on Discord, ''Observing'' that the strategic advantage of using gore is limited, ''Realizing'' that there are never any circumstances in which the use of gore can be justified, ''Hopeful'' that all servers will be..." wikitext text/x-wiki The World Assembly, ''Horrified'' by the recent usage of gore in attacks, ''Concerned'' that other servers may do the same, ''Highlighting'' that this is a barbaric way of fighting wars, ''Acknowledging'' the amount of minors and other vulnerable groups on Discord, ''Observing'' that the strategic advantage of using gore is limited, ''Realizing'' that there are never any circumstances in which the use of gore can be justified, ''Hopeful'' that all servers will be able to recognize this, ''Calls'' for a complete and permanent end to all usage of gore in Discord wars; ''Condemns'' all previous usage of gore in Discord wars; ''Declares'' that it considers the usage of gore in Discord wars to be a war crime. a7f4d9d04cf77ccf7165a6c72c051aac9b47b771 WA Resolution 0003 (2021) 0 188 516 2023-03-29T00:32:04Z Numa6442 9 Created page with "The World Assembly, ''Recalling'' the 4th Brigade nuking the Sith Empire, ''Highlighting'' the fact that the attack was unprovoked, ''Horrified'' that a member of the LoS is not spared from the ever growing ambition of conquering servers of the 4th Brigade, ''Concerned'' that the Authority may have been involved, ''Hopeful'' that this conflict can reach a peaceful end, Hereby condemns the 4th Brigade." wikitext text/x-wiki The World Assembly, ''Recalling'' the 4th Brigade nuking the Sith Empire, ''Highlighting'' the fact that the attack was unprovoked, ''Horrified'' that a member of the LoS is not spared from the ever growing ambition of conquering servers of the 4th Brigade, ''Concerned'' that the Authority may have been involved, ''Hopeful'' that this conflict can reach a peaceful end, Hereby condemns the 4th Brigade. e3684f1a101bbae295cb10520563785c04b00050 WA Resolution 0004 (2021) 0 189 518 2023-03-29T00:47:29Z Numa6442 9 Created page with "The World Assembly, ''Realising'' that some individuals and member nations have made outstanding contributions to the League of Servers throughout its existence, ''Concerned'' that there are, as of now, very few ways to reward said nations and individuals, ''Acknowledging'' that the League can only exist and prosper as long as there are people willing to commit themselves and put effort into making it a better place, Hereby establishes a system of international awa..." wikitext text/x-wiki The World Assembly, ''Realising'' that some individuals and member nations have made outstanding contributions to the League of Servers throughout its existence, ''Concerned'' that there are, as of now, very few ways to reward said nations and individuals, ''Acknowledging'' that the League can only exist and prosper as long as there are people willing to commit themselves and put effort into making it a better place, Hereby establishes a system of international awards, consisting of: <u>The Golden Cross of Merit</u> The League’s highest award, given to recognize individuals or nations for outstanding contributions to the security or the interests of the League of Servers, world peace, cultural or other significant public or private endeavours. <u>The Silver Cross of Merit</u> The League’s second-highest award, given to recognize individuals or nations for continuous contributions to the security or the interests of the League of Servers, world peace, cultural or other significant public or private endeavours. <u>The LOS World Peace Award</u> An award to recognize LOS or foreign individuals, groups, or nations, who have put considerable effort into upholding peace and fraternity between nations, for mediating conflicts, or for holding or promoting peace congresses. <u>The LOS Mock-Gov Leadership Award</u> An award to recognize LOS or foreign individuals for significant contributions to the Discord mock-government community, those who worked to grow it and bring it closer together, and who left behind a lasting influence. <u>Growth & Outreach Ribbon</u> Given to members of the League of Servers for substantial contributions to the expansion and development of the League, for outstanding diplomatic service on its behalf or for work to promote fraternity and cooperation between its members. <u>Peace and Protection Ribbon</u> Given to members of the League of Servers for courageous and selfless service to protect the League, its members, and world peace. <u>Cooperation Ribbon</u> Given to members of the League of Servers for considerable work to improve the relations or promote diplomacy between the League’s member-states and for bringing our community closer together. <u>Selfless Service Ribbon</u> Given to members of the League of Servers for enduring personal efforts aimed at helping the League or for exemplary work in one or multiple of its departments. Hereby also establishes the Awards Committee of the World Assembly, consisting of 3 member servers overseen by the League Secretariat, whose job it is to once a month select and award those individuals or nations deemed worthy of receiving one or more of the aforementioned awards. Hereby also petitions the Secretary-General to create the according roles for the awards listed above. 8b90add156d24d8d4dc68df4e0292ffd9785f0c7 WA Resolution 0009 (2021) 0 190 519 2023-03-29T00:49:11Z Numa6442 9 Created page with "The World Assembly. '''''Deeply Disturbed''''', By the Recent Nukes and attacks on Members of the League, '''''Alarmed by''''', Lack of Discussion and action  on the recent events in either The assembly or the Security council, '''''Seeking,''''' Cooperation and.coordination to protect the league and its members from further hostilities, the assembly shall; # ''Calls upon'' The Secretary-General to remedy the inactive behaviour of both the chambers; # ''Furthur..." wikitext text/x-wiki The World Assembly. '''''Deeply Disturbed''''', By the Recent Nukes and attacks on Members of the League, '''''Alarmed by''''', Lack of Discussion and action  on the recent events in either The assembly or the Security council, '''''Seeking,''''' Cooperation and.coordination to protect the league and its members from further hostilities, the assembly shall; # ''Calls upon'' The Secretary-General to remedy the inactive behaviour of both the chambers; # ''Furthur Proclaims,'' That if the Security Council or the Assembly is unable to fulfill its duty, that a emergency security  council shall be made by the secretary general, consisting of 15 members who are actively participating in world events. This council shall be granted all power and authority of the security council on matters of International peace and security; # ''Solely Affirms'' That this resolution shall allow quick resolution of Any crisis which threatens the international peace and security of the nation; # ''Declares Accordingly,'' That this Resolution is called United for peace resolution; Stays Resolved for the same. e85787b35e65d8d19ae090de26f4e0bfdea41303 Template:Infobox court 10 191 521 520 2023-03-31T15:43:37Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{Infobox | above = {{if empty|{{{court_name|}}}|<includeonly>{{PAGENAME}}</includeonly>}} | subheader = {{{native_name|}}} | imagestyle = padding-bottom:0.4em; border-bottom:solid 1px #aaa; | image = {{#invoke:InfoboxImage|InfoboxImage |image={{if empty|{{{image|}}} }}|size={{{imagesize|}}} |upright={{if empty|{{{image_upright|}}}|1}} |alt={{{alt|}}}}} | caption = {{{caption|}}} | image2 = {{#invoke:InfoboxImage|InfoboxImage |image={{if empty|{{{image2|}}}}}|size={{{imagesize2|}}} |upright={{if empty|{{{image_upright2|}}}|1}} |alt={{{alt2|}}}}} | caption2 = {{{caption2|}}} | headerstyle = background-color: #E7E7FF; border-top:solid 1px #aaa; | label1 = Established | data1 = {{{established|}}} | label2 = Dissolved | data2 = {{{dissolved|}}} | label3 = Jurisdiction | data3 = {{{jurisdiction|}}} | label4 = Location | data4 = {{{location|}}} | label5 = [[Geographic coordinate system|Coordinates]] | data5 = {{{coordinates|}}} | label6 = Motto | data6 = {{{motto|}}} | label7 = Composition method | data7 = {{{type|}}} | label8 = {{{at|Authorized}}} by | data8 = {{{authority|}}} | label9 = [[Appellate court|Appeals to]] | data9 = {{{appealsto|{{{appeals|}}}}}} | label10 = {{nowrap|[[Appeal|Appeals from]]}} | data10 = {{{appealsfrom|}}} | label11 = Judge term length | data11 = {{{terms|}}} | label12 = Number of positions | data12 = {{{positions|}}} | label13 = Annual budget | data13 = {{{budget|}}} | label14 = Language | data14 = {{{language|}}} | label15 = Type of tribunal | data15 = {{{tribunal-type|}}} | label16 = Website | data16 = {{{website|}}} | header17 = {{{chiefjudgetitle|}}} | label18 = Currently | data18 = {{{chiefjudgename|}}} | label19 = Since | data19 = {{{termstart|}}} | label20 = Lead position ends | data20 = {{{termend|}}} | label21 = Jurist term ends | data21 = {{{termend2|}}} | header22 = {{{chiefjudgetitle2|}}} | label23 = Currently | data23 = {{{chiefjudgename2|}}} | label24 = Since | data24 = {{{termstart2|}}} | label25 = Lead position ends | data25 = {{{termend3|}}} | label26 = Jurist term ends | data26 = {{{termend4|}}} | header27 = {{{chiefjudgetitle3|}}} | label28 = Currently | data28 = {{{chiefjudgename3|}}} | label29 = Since | data29 = {{{termstart3|}}} | label30 = Lead position ends | data30 = {{{termend5|}}} | label31 = Jurist term ends | data31 = {{{termend6|}}} | header32 = {{#if:{{{division_map|}}}|Division map}} | data33 = {{#invoke:InfoboxImage|InfoboxImage|image={{{division_map|}}}|size={{{division_map_size|}}}|alt={{{division_map_alt|}}}}} | data34 = {{#if:{{{division_map|}}}|{{{division_caption|}}}}} }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox court with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox court]] with unknown parameter "_VALUE_"|ignoreblank=y| court_name | native_name | image | imagesize | alt | caption | image2 | imagesize2 | image_upright | image_upright2 | alt2 | caption2 | established | dissolved | jurisdiction | location | coordinates | motto | type | authority | appealsto | appealsfrom | terms | positions | budget | language | tribunal-type | website | chiefjudgetitle | chiefjudgename | termstart | termend | termend2 | chiefjudgetitle2 | chiefjudgename2 | termstart2 | termend3 | termend4 | chiefjudgetitle3 | chiefjudgename3 | termstart3 | termend5 | termend6 | division_map | division_map_size | division_map_alt | division_caption }}<noinclude> {{Documentation}}<!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 21fd8dbea1629407e2387cd8e8be23bae8a66b32 Template:Infobox court case 10 192 523 522 2023-03-31T15:43:37Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#invoke:infobox|infoboxTemplate | italic title = {{{italic title|<noinclude>no</noinclude>}}} | bodyclass = scotus | above = {{if empty| {{{name|}}} | {{{Litigants|}}} | <includeonly>{{PAGENAMEBASE}}</includeonly> }} | abovestyle = font-style: italic; font-size: 125%; | aboveclass = fn | image = {{#invoke:InfoboxImage|InfoboxImage|image={{if empty |{{{image|}}} |{{Infobox court case/images|courtimage={{{court}}}|date={{{date decided|}}} }} |{{{CourtSeal|}}} }}|size={{{imagesize|}}}|sizedefault=frameless|upright={{{image_upright|0.82}}}|link={{{imagelink|}}}|alt={{{imagealt|}}} }} | caption = {{{caption|}}} | headerstyle = white-space:nowrap | label1 = Court | data1 = {{{CourtName|{{{Court|{{{court|}}} }}} }}} | label2 = Full case name | data2 = {{#if: {{{FullName|{{{full name|}}} }}} | ''{{{FullName|{{{full name|}}} }}}'' }} | label3 = Argued | data3 = {{#if:{{{ArgueDate|}}} | {{{ArgueDate}}}{{#if:{{{ArgueDateB|}}}|,&#32;{{{ArgueDateB}}} }}{{#if:{{{ArgueDateC|}}}|–{{{ArgueDateC}}} }} {{{ArgueYear|}}} }}{{#if:{{{ArgueDateA|}}} | {{#iferror:{{#expr:{{{ArgueDateB}}}+1}} | {{{ArgueDateA}}}&nbsp;–&nbsp;{{{ArgueDateB}}} {{{ArgueYear|}}} | {{{ArgueDateA}}}–{{{ArgueDateB}}} {{{ArgueYear|}}} }} }} | label4 = Reargued | data4 = {{#if:{{{ReargueDate|}}} | {{{ReargueDate}}} {{{ReargueYear|}}} }}{{#if:{{{ReargueDateA|}}} | {{{ReargueDateA}}}–{{{ReargueDateB}}} {{{ReargueYear|}}} }}{{#if:{{{ReargueDate2|}}} | {{{ReargueDate2}}} {{{ReargueYear2|}}} }}{{#if:{{{ReargueDateA2|}}} | {{{ReargueDateA2}}}–{{{ReargueDateB2}}} {{{ReargueYear2|}}} }} | label5 = Submitted | data5 = {{{SubmitDate|}}} {{{SubmitYear|}}} | label6 = [[Indictment]] | data6 = {{{indictment|}}} | label7 = Started | data7 = {{{start_date|{{{start date|}}}}}} | label8 = Decided | data8 = {{{DecideDate|{{{date_decided|{{{date decided|}}} }}} }}} {{{DecideYear|}}} | label9 = Docket nos. | data9 = {{{docket|}}} | label10 = Verdict | data10 = {{{verdict|}}} | label11 = Defendant | data11 = {{{defendant|}}} | label12 = Charge | data12 = {{{charge|}}} | label13 = Prosecution | data13 = {{{prosecution|{{{prosecutor|}}}}}} | label14 = Counsel for plaintiff(s) | data14 = {{{counsel for plaintiff|}}} | label15 = Plaintiff(s) | data15 = {{{plaintiff|}}} | label16 = {{#if:{{{defense|}}}|Defense|Defence}} | data16 = {{{defence|{{{defense|}}} }}} | label17 = Citation(s) | data17 = {{{Citation|{{{citations|{{{Citations|{{{CitationNew|}}} }}} }}} }}} | label18 = [[European Case Law Identifier|ECLI]] | data18 = {{{ECLI|}}} | label19 = Neutral citation | data19 = {{{Neutral Citation|}}} | label20 = Reported at | data20 = {{{Other Citations|}}} | label21 = {{nowrap|Transcript(s)}} | data21 = {{{transcripts|}}} | label22 = Claim | data22 = {{{Claim|}}} | label23 = Cases cited | data23 = {{{Cases_cited|}}} | label24 = Legislation cited | data24 = {{{Legislation_cited|}}} | header27 = {{#if: {{{prior_actions|{{{prior actions|}}} }}} {{{Prior|}}} {{{appealed from|}}} {{{appealed to|}}} {{{subsequent_actions|{{{subsequent actions|}}} }}} {{{Subsequent|}}} {{{Procedural|}}} {{{Related|}}} {{{related actions|}}} | Case history }} | label28 = {{#if: {{{Prior|}}} | Prior history | Prior action(s) }} | data28 = {{#if: {{{Prior|}}} | {{{Prior|}}} | {{{prior_actions|{{{prior actions|}}} }}} }} | label29 = Appealed from | data29 = {{{appealed from|}}} | label30 = Appealed to | data30 = {{{appealed to|}}} | label31 = {{#if: {{{Subsequent|}}} | Subsequent history | Subsequent action(s) }} | data31 = {{#if: {{{Subsequent|}}} | {{{Subsequent|}}} | {{{subsequent_actions|{{{subsequent actions|}}} }}} }} | label32 = Procedural history | data32 = {{{Procedural|}}} | label33 = {{#if: {{{Related|}}} | Related cases | Related action(s) }} | data33 = {{#if: {{{Related|}}} | {{{Related|}}} | {{{related actions|}}} }} | label34 = Argument | data34 = {{#if:{{{OralArgument|}}}|[{{{OralArgument}}} Oral argument]|{{#if:{{{OralArguments|}}}|{{{OralArguments}}}}}}} | label35 = Reargument | data35 = {{#if:{{{OralReargument|}}}|[{{{OralReargument}}} Reargument]}} | label36 = Opinion announcement | data36 = {{#if:{{{OpinionAnnouncement|}}}|[{{{OpinionAnnouncement}}} Opinion announcement]}} | header42 = {{#if: {{{Outcome|}}} | Outcome | {{#if:{{{QuestionsPresented|}}} | Questions presented | {{#if: {{{Holding|{{{holding|}}} }}} | Holding | {{#if: {{{Ruling|}}} | Ruling | {{#if: {{{opinions|}}} | Case opinions }} }} }} }} }} | data43 = {{if empty|{{{Outcome|}}}|{{{QuestionsPresented|}}}|{{{Holding|{{{holding|}}} }}}|{{{Ruling|}}}|{{{opinions|}}}}} | header47 = {{#if: {{{judges|{{{Judges|{{{Membership|{{{judge|}}} }}} }}} }}} {{{ChiefJudge|}}} {{{AssociateJudges|}}} | Court membership }} | label48 = {{#if:{{{number of judges|}}} | {{#switch: {{{number of judges|}}} | 1 = Judge sitting | Judges sitting }} | Judge(s) sitting}} | data48 = {{{judges|{{{Judges|{{{Membership|{{{judge|}}} }}} }}} }}} | label49 = {{#if: {{{ChiefJudgeTitle|}}} | {{{ChiefJudgeTitle}}} | Chief judge }} | data49 = {{{ChiefJudge|}}} | label50 = {{#if: {{{AssociateJudgesTitle|}}} | {{{AssociateJudgesTitle}}} | Associate judges }} | data50 = {{{AssociateJudges|}}} | header51 = {{#if: {{{decision by|}}}{{{Majority|}}}{{{Plurality|}}}{{{PerCuriam|}}}{{{Dissent|}}}{{{Concurrence|}}} | Case opinions }} | data52 = {{#if: {{{QuestionsPresented|}}} | | {{#if:{{{PerCuriam|}}}|''{{lang|la|Per curiam}}''}} }} | label53 = Decision by | data53 = {{{decision by|}}} | label54 = Majority | data54 = {{{Majority|}}}{{#if:{{{JoinMajority|}}}|, joined {{#ifeq:{{{JoinMajority}}}|unanimously||by }} {{{JoinMajority}}} }} | label55 = Majority | data55 = {{{Majority2|}}}{{#if:{{{JoinMajority2|}}}|, joined by {{{JoinMajority2}}} }} | label56 = Majority | data56 = {{{Majority3|}}}{{#if:{{{JoinMajority3|}}}|, joined by {{{JoinMajority3}}} }} | label57 = Plurality | data57 = {{{Plurality|}}}{{#if:{{{JoinPlurality|}}}|, joined by {{{JoinPlurality}}} }} | label58 = Plurality | data58 = {{{Plurality2|}}}{{#if:{{{JoinPlurality2|}}}|, joined by {{{JoinPlurality2}}} }} | label59 = Plurality | data59 = {{{Plurality3|}}}{{#if:{{{JoinPlurality3|}}}|, joined by {{{JoinPlurality3}}} }} | label60 = Plurality | data60 = {{{Plurality4|}}}{{#if:{{{JoinPlurality4|}}}|, joined by {{{JoinPlurality4}}} }} | label61 = Seriatim opinion | data61 = {{{Seriatim|}}} | label62 = Seriatim opinion | data62 = {{{Seriatim2|}}} | label63 = Seriatim opinion | data63 = {{{Seriatim3|}}} | label64 = Seriatim opinion | data64 = {{{Seriatim4|}}} | label65 = Seriatim opinion | data65 = {{{Seriatim5|}}} | label66 = Concurrence | data66 = {{{concurring|{{{Concurrence|}}}}}}{{#if:{{{JoinConcurrence|}}}|, joined by {{{JoinConcurrence}}}}} | label67 = Concurrence | data67 = {{{Concurrence2|}}}{{#if:{{{JoinConcurrence2|}}}|, joined by {{{JoinConcurrence2}}}}} | label68 = Concurrence | data68 = {{{Concurrence3|}}}{{#if:{{{JoinConcurrence3|}}}|, joined by {{{JoinConcurrence3}}}}} | label69 = Concurrence | data69 = {{{Concurrence4|}}}{{#if:{{{JoinConcurrence4|}}}|, joined by {{{JoinConcurrence4}}}}} | label70 = Concurrence | data70 = {{{Concurrence5|}}}{{#if:{{{JoinConcurrence5|}}}|, joined by {{{JoinConcurrence5}}}}} | label71 = Concurrence | data71 = {{{Concurrence6|}}}{{#if:{{{JoinConcurrence6|}}}|, joined by {{{JoinConcurrence6}}}}} | label72 = Concurrence | data72 = {{{Concurrence7|}}}{{#if:{{{JoinConcurrence7|}}}|, joined by {{{JoinConcurrence7}}}}} | label73 = Concurrence | data73 = {{{Concurrence8|}}}{{#if:{{{JoinConcurrence8|}}}|, joined by {{{JoinConcurrence8}}}}} | label74 = Concur/dissent | data74 = {{{Concur/dissent|{{{Concurrence/Dissent|{{{concur/dissent|}}}}}}}}}{{#if:{{{JoinConcurrence/Dissent|}}}|, joined by {{{JoinConcurrence/Dissent}}}}} | label75 = Concur/dissent | data75 = {{{Concurrence/Dissent2|}}}{{#if:{{{JoinConcurrence/Dissent2|}}}|, joined by {{{JoinConcurrence/Dissent2}}}}} | label76 = Concur/dissent | data76 = {{{Concurrence/Dissent3|}}}{{#if:{{{JoinConcurrence/Dissent3|}}}|, joined by {{{JoinConcurrence/Dissent3}}}}} | label77 = Concur/dissent | data77 = {{{Concurrence/Dissent4|}}}{{#if:{{{JoinConcurrence/Dissent4|}}}|, joined by {{{JoinConcurrence/Dissent4}}}}} | label78 = Concur/dissent | data78 = {{{Concurrence/Dissent5|}}}{{#if:{{{JoinConcurrence/Dissent5|}}}|, joined by {{{JoinConcurrence/Dissent5}}}}} | label79 = Concur/dissent | data79 = {{{Concurrence/Dissent6|}}}{{#if:{{{JoinConcurrence/Dissent6|}}}|, joined by {{{JoinConcurrence/Dissent6}}}}} | label80 = Concur/dissent | data80 = {{{Concurrence/Dissent7|}}}{{#if:{{{JoinConcurrence/Dissent7|}}}|, joined by {{{JoinConcurrence/Dissent7}}}}} | label81 = Concur/dissent | data81 = {{{Concurrence/Dissent8|}}}{{#if:{{{JoinConcurrence/Dissent8|}}}|, joined by {{{JoinConcurrence/Dissent8}}}}} | label82 = Dissent | data82 = {{{dissenting|{{{Dissent|}}}}}}{{#if:{{{JoinDissent|}}}|, joined by {{{JoinDissent}}}}} | label83 = Concurrence | data83 = {{{ConcurrenceDissent|}}} | label84 = Dissent | data84 = {{{Dissent2|}}}{{#if:{{{JoinDissent2|}}}|, joined by {{{JoinDissent2}}}}} | label85 = Concurrence | data85 = {{{ConcurrenceDissent2|}}} | label86 = Dissent | data86 = {{{Dissent3|}}}{{#if:{{{JoinDissent3|}}}|, joined by {{{JoinDissent3}}}}} | label87 = Concurrence | data87 = {{{ConcurrenceDissent3|}}} | label88 = Dissent | data88 = {{{Dissent4|}}}{{#if:{{{JoinDissent4|}}}|, joined by {{{JoinDissent4}}}}} | label89 = Concurrence | data89 = {{{ConcurrenceDissent4|}}} | label90 = Dissent | data90 = {{{Dissent5|}}}{{#if:{{{JoinDissent5|}}}|, joined by {{{JoinDissent5}}}}} | data91 = {{#if:{{{NotParticipating|}}}|<small>{{{NotParticipating}}} took no part in the consideration or decision of the case.</small>}} | header97 = {{#if: {{{LawsApplied|{{{laws_applied|}}} }}} | Laws applied }} | data98 = {{{LawsApplied|{{{laws_applied|}}} }}} | data99 = {{#if:{{{Superseded|}}}|<div style="background-color: red; color: white; font-weight: bold">Superseded by</div>}} | data100 = {{{Superseded|}}} | data101 = {{#if:{{{Overruled|}}}|<div style="background-color: red; color: white; font-weight: bold">Overruled by</div>}} | data102 = {{{Overruled|}}} | data103 = {{#if:{{{Overturned previous case|}}}|<div style="background-color: green; color: white; font-weight: bold">This case overturned a previous ruling</div>}} | data104 = {{{Overturned previous case|}}} | data105 = {{#if:{{{Abrogated|}}}|<div style="background-color: red; color: white; font-weight: bold">Abrogated by</div>}} | data106 = {{{Abrogated|}}} | header107 = {{#if: {{{Keywords|{{{keywords|}}} }}} | Keywords | {{#if: {{{Area of Law|{{{area of law|}}}}}} | Area of law }} }} | data108 = {{{Keywords|{{{keywords|{{{Area of Law|{{{area of law|}}}}}} }}} }}} }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox court case with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox court case]] with unknown parameter "_VALUE_"|ignoreblank=y| Abrogated | appealed from | appealed to | Area of Law | ArgueDate | ArgueDateA | ArgueDateB | ArgueDateC | ArgueYear | AssociateJudges | AssociateJudgesTitle | caption | Cases_cited | charge | ChiefJudge | ChiefJudgeTitle | Citation | CitationNew | citations | Citations | Claim | concur/dissent | Concur/dissent | Concurrence | Concurrence/Dissent | Concurrence/Dissent2 | Concurrence/Dissent3 | Concurrence/Dissent4 | Concurrence/Dissent5 | Concurrence/Dissent6 | Concurrence/Dissent7 | Concurrence/Dissent8 | Concurrence2 | Concurrence3 | Concurrence4 | Concurrence5 | Concurrence6 | Concurrence7 | Concurrence8 | ConcurrenceDissent | ConcurrenceDissent2 | ConcurrenceDissent3 | ConcurrenceDissent4 | concurring | counsel for plaintiff | court | Court | CourtName | CourtSeal | date decided | date_decided | DecideDate | DecideYear | decision by | defence | defense | defendant | Dissent | Dissent2 | Dissent3 | Dissent4 | Dissent5 | dissenting | docket | ECLI | full name | FullName | Holding | holding | image | image_upright | imagealt | imagelink | imagesize | indictment | italic title | JoinConcurrence | JoinConcurrence/Dissent | JoinConcurrence/Dissent2 | JoinConcurrence/Dissent3 | JoinConcurrence/Dissent4 | JoinConcurrence/Dissent5 | JoinConcurrence/Dissent6 | JoinConcurrence/Dissent7 | JoinConcurrence/Dissent8 | JoinConcurrence2 | JoinConcurrence3 | JoinConcurrence4 | JoinConcurrence5 | JoinConcurrence6 | JoinConcurrence7 | JoinConcurrence8 | JoinDissent | JoinDissent2 | JoinDissent3 | JoinDissent4 | JoinDissent5 | JoinMajority | JoinMajority2 | JoinMajority3 | JoinPlurality | JoinPlurality2 | JoinPlurality3 | JoinPlurality4 | judge | judges | Judges | Keywords | keywords | laws_applied | LawsApplied | Legislation_cited | Litigants | Majority | Majority2 | Majority3 | Membership | name | Neutral Citation | NotParticipating | number of judges | OpinionAnnouncement | opinions | OralArgument | OralArguments | OralReargument | Other Citations | Outcome | Overruled | Overturned previous case | PerCuriam | plaintiff | Plurality | Plurality2 | Plurality3 | Plurality4 | Prior | prior actions | prior_actions | Procedural | prosecution | prosecutor | QuestionsPresented | ReargueDate | ReargueDate2 | ReargueDateA | ReargueDateA2 | ReargueDateB | ReargueDateB2 | ReargueYear | ReargueYear2 | Related | related actions | Ruling | Seriatim | Seriatim2 | Seriatim3 | Seriatim4 | Seriatim5 | start date | start_date | SubmitDate | SubmitYear | Subsequent | subsequent actions | subsequent_actions | Superseded | transcripts | verdict }}<noinclude>{{Documentation}}<!-- Please place category links in [[Template:Infobox court case/doc]], and interwikis on Wikidata.--> </noinclude> 0edf8542bd012748593e78913b9085f87691d98d Module:Infobox 828 50 525 524 2023-03-31T15:43:43Z 17ademoladav 2 1 revision imported Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local lists = { plainlist_t = { patterns = { '^plainlist$', '%splainlist$', '^plainlist%s', '%splainlist%s' }, found = false, styles = 'Plainlist/styles.css' }, hlist_t = { patterns = { '^hlist$', '%shlist$', '^hlist%s', '%shlist%s' }, found = false, styles = 'Hlist/styles.css' } } local function has_list_class(args_to_check) for _, list in pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg or '', pattern) then list.found = true break end end if list.found then break end end end end end local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class, args.headerclass }) root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class }) local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true has_list_class({args.titleclass}) root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true has_list_class({ args.aboveclass }) root :tag('tr') :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true has_list_class({ args.belowclass }) root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ subheaderArgs.rowclass, subheaderArgs.class }) local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ imageArgs.rowclass, imageArgs.class }) local row = root:tag('tr') row:addClass(imageArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(require('Module:Italic title')._main({})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if args.decat == 'yes' then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() local hlist_templatestyles = '' if lists.hlist_t.found then hlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.hlist_t.styles } } end local plainlist_templatestyles = '' if lists.plainlist_t.found then plainlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.plainlist_t.styles } } end -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ -- hlist -> plainlist -> base is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because the rows of interest invoking -- each class may not be on a specific page hlist_templatestyles, plainlist_templatestyles, base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) has_list_class({ args.bodyclass }) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p 0ddb7e5c8426d67cd589b710efb9912ddfb67fea Template:Post-nominals 10 193 527 526 2023-03-31T15:43:44Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <span class="noexcerpt nowraplinks" style="font-size:{{{size|85%}}}; font-weight:normal;"><!-- -->{{if empty|{{{unlinked|}}}|{{{list|}}}|{{{post-noms|}}}|{{for loop|{{#if:{{{sep|}}}{{{commas|}}}|<span style="font-size:14px;>&#44;</span>}}&#32;|call=post-nominals/{{{country|CAN}}}|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}|{{{10|}}}|{{{11|}}}|{{{12|}}}|{{{13|}}}|{{{14|}}}|{{{15|}}}|{{{16|}}}|{{{17|}}}|{{{18|}}}|{{{19|}}}|{{{20|}}}|skipBlanks=yes}}}}<!-- --></span><!-- -->{{#if:{{{country|{{{unlinked|{{{list|{{{post-noms|<noinclude>1</noinclude>}}}}}}}}}}}}||[[Category:Pages using Template:Post-nominals with missing parameters]]}}<!-- -->{{#if:{{{unlinked|{{{list|{{{post-noms|}}}}}}}}}|[[Category:Pages using Template:Post-nominals with customized linking]] }}<noinclude>{{Documentation}}</noinclude> 2b89288bd9d53136ad548b8a601c1bf4f69e8daf Module:If empty 828 49 529 528 2023-03-31T15:43:46Z 17ademoladav 2 1 revision imported Scribunto text/plain local p = {} function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false}) for k,v in ipairs(args) do if v ~= '' then return v end end end return p 4790391408957dea3ff9f453834c05f6b379a45c Template:Longitem 10 84 531 530 2023-03-31T15:43:47Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <noinclude>{{#tag:syntaxhighlight| </noinclude>{{#ifeq: {{{1|+}}} | {{{1|-}}} | {{#if: {{{1|}}} | <div style="display: inline-block; line-height: 1.2em; padding: .1em 0;{{#if:{{{style|}}} | {{{style|}}}}}">{{{1|}}}</div><includeonly>{{#if:{{{2|}}}|[[Category:Pages using Template:Longitem with unnamed style parameter]]}}</includeonly> }} | line-height: 1.2em; padding: .1em 0; }}<noinclude> |lang=python}} {{documentation}} </noinclude> 11b1fe9bc23a82dd5ae78e742d4656024348236b Module:Navbar 828 75 533 532 2023-03-31T15:43:48Z 17ademoladav 2 1 revision imported Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '' -- TODO: Get link_descriptions and show into the configuration module. -- link_descriptions should be easier... local link_descriptions = { { ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template', ['link'] = title.fullText, ['url'] = false }, { ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template', ['link'] = talkpage, ['url'] = false }, { ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template', ['link'] = title:fullUrl('action=edit'), ['url'] = true }, { ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template', ['link'] = title:fullUrl('action=history'), ['url'] = true }, { ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template', ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, { ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template', ['link'] = title:fullUrl('action=watch'), ['url'] = true } } local ul = mw.html.create('ul') if has_brackets then ul:addClass(cfg.classes.brackets) :cssText(font_style) end for i, _ in ipairs(displayed_links) do if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end end return ul:done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end local frame = mw.getCurrentFrame() -- hlist -> navbar is best-effort to preserve old Common.css ordering. return frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } .. frame:extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p 79f907e59eaa8bbf8dd50bb751933ebeaaa7eb17 Module:Navbar/configuration 828 76 535 534 2023-03-31T15:43:49Z 17ademoladav 2 1 revision imported Scribunto text/plain return { ['templatestyles'] = 'Module:Navbar/styles.css', ['hlist_templatestyles'] = 'Hlist/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['this_box'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } b007c336b17ec4bcd4d5a9dca9f8cba301662b55 Module:Navbox 828 101 537 536 2023-03-31T15:43:49Z 17ademoladav 2 1 revision imported Scribunto text/plain local p = {} local navbar = require('Module:Navbar')._navbar local cfg = mw.loadData('Module:Navbox/configuration') local getArgs -- lazily initialized local args local format = string.format local function striped(wikitext, border) -- Return wikitext with markers replaced for odd/even striping. -- Child (subgroup) navboxes are flagged with a category that is removed -- by parent navboxes. The result is that the category shows all pages -- where a child navbox is not contained in a parent navbox. local orphanCat = cfg.category.orphan if border == cfg.keyword.border_subgroup and args[cfg.arg.orphan] ~= cfg.keyword.orphan_yes then -- No change; striping occurs in outermost navbox. return wikitext .. orphanCat end local first, second = cfg.class.navbox_odd_part, cfg.class.navbox_even_part if args[cfg.arg.evenodd] then if args[cfg.arg.evenodd] == cfg.keyword.evenodd_swap then first, second = second, first else first = args[cfg.arg.evenodd] second = first end end local changer if first == second then changer = first else local index = 0 changer = function (code) if code == '0' then -- Current occurrence is for a group before a nested table. -- Set it to first as a valid although pointless class. -- The next occurrence will be the first row after a title -- in a subgroup and will also be first. index = 0 return first end index = index + 1 return index % 2 == 1 and first or second end end local regex = orphanCat:gsub('([%[%]])', '%%%1') return (wikitext:gsub(regex, ''):gsub(cfg.marker.regex, changer)) -- () omits gsub count end local function processItem(item, nowrapitems) if item:sub(1, 2) == '{|' then -- Applying nowrap to lines in a table does not make sense. -- Add newlines to compensate for trim of x in |parm=x in a template. return '\n' .. item ..'\n' end if nowrapitems == cfg.keyword.nowrapitems_yes then local lines = {} for line in (item .. '\n'):gmatch('([^\n]*)\n') do local prefix, content = line:match('^([*:;#]+)%s*(.*)') if prefix and not content:match(cfg.pattern.nowrap) then line = format(cfg.nowrap_item, prefix, content) end table.insert(lines, line) end item = table.concat(lines, '\n') end if item:match('^[*:;#]') then return '\n' .. item ..'\n' end return item end local function has_navbar() return args[cfg.arg.navbar] ~= cfg.keyword.navbar_off and args[cfg.arg.navbar] ~= cfg.keyword.navbar_plain and ( args[cfg.arg.name] or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.pattern.sandbox, '') ~= cfg.pattern.navbox ) end local function renderNavBar(titleCell) if has_navbar() then titleCell:wikitext(navbar{ [cfg.navbar.name] = args[cfg.arg.name], [cfg.navbar.mini] = 1, [cfg.navbar.fontstyle] = (args[cfg.arg.basestyle] or '') .. ';' .. (args[cfg.arg.titlestyle] or '') .. ';background:none transparent;border:none;box-shadow:none;padding:0;' }) end end local function renderTitleRow(tbl) if not args[cfg.arg.title] then return end local titleRow = tbl:tag('tr') local titleCell = titleRow:tag('th'):attr('scope', 'col') local titleColspan = 2 if args[cfg.arg.imageleft] then titleColspan = titleColspan + 1 end if args[cfg.arg.image] then titleColspan = titleColspan + 1 end titleCell :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.titlestyle]) :addClass(cfg.class.navbox_title) :attr('colspan', titleColspan) renderNavBar(titleCell) titleCell :tag('div') -- id for aria-labelledby attribute :attr('id', mw.uri.anchorEncode(args[cfg.arg.title])) :addClass(args[cfg.arg.titleclass]) :css('font-size', '114%') :css('margin', '0 4em') :wikitext(processItem(args[cfg.arg.title])) end local function getAboveBelowColspan() local ret = 2 if args[cfg.arg.imageleft] then ret = ret + 1 end if args[cfg.arg.image] then ret = ret + 1 end return ret end local function renderAboveRow(tbl) if not args[cfg.arg.above] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.aboveclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.abovestyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') -- id for aria-labelledby attribute, if no title :attr('id', args[cfg.arg.title] and nil or mw.uri.anchorEncode(args[cfg.arg.above])) :wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems])) end local function renderBelowRow(tbl) if not args[cfg.arg.below] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.belowclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.belowstyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') :wikitext(processItem(args[cfg.arg.below], args[cfg.arg.nowrapitems])) end local function renderListRow(tbl, index, listnum, listnums_size) local row = tbl:tag('tr') if index == 1 and args[cfg.arg.imageleft] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 2px 0 0') :cssText(args[cfg.arg.imageleftstyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.imageleft])) end local group_and_num = format(cfg.arg.group_and_num, listnum) local groupstyle_and_num = format(cfg.arg.groupstyle_and_num, listnum) if args[group_and_num] then local groupCell = row:tag('th') -- id for aria-labelledby attribute, if lone group with no title or above if listnum == 1 and not (args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group2]) then groupCell :attr('id', mw.uri.anchorEncode(args[cfg.arg.group1])) end groupCell :attr('scope', 'row') :addClass(cfg.class.navbox_group) :addClass(args[cfg.arg.groupclass]) :cssText(args[cfg.arg.basestyle]) -- If groupwidth not specified, minimize width :css('width', args[cfg.arg.groupwidth] or '1%') groupCell :cssText(args[cfg.arg.groupstyle]) :cssText(args[groupstyle_and_num]) :wikitext(args[group_and_num]) end local listCell = row:tag('td') if args[group_and_num] then listCell :addClass(cfg.class.navbox_list_with_group) else listCell:attr('colspan', 2) end if not args[cfg.arg.groupwidth] then listCell:css('width', '100%') end local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing if index % 2 == 1 then rowstyle = args[cfg.arg.oddstyle] else rowstyle = args[cfg.arg.evenstyle] end local list_and_num = format(cfg.arg.list_and_num, listnum) local listText = args[list_and_num] local oddEven = cfg.marker.oddeven if listText:sub(1, 12) == '</div><table' then -- Assume list text is for a subgroup navbox so no automatic striping for this row. oddEven = listText:find(cfg.pattern.navbox_title) and cfg.marker.restart or cfg.class.navbox_odd_part end local liststyle_and_num = format(cfg.arg.liststyle_and_num, listnum) local listclass_and_num = format(cfg.arg.listclass_and_num, listnum) listCell :css('padding', '0') :cssText(args[cfg.arg.liststyle]) :cssText(rowstyle) :cssText(args[liststyle_and_num]) :addClass(cfg.class.navbox_list) :addClass(cfg.class.navbox_part .. oddEven) :addClass(args[cfg.arg.listclass]) :addClass(args[listclass_and_num]) :tag('div') :css('padding', (index == 1 and args[cfg.arg.list1padding]) or args[cfg.arg.listpadding] or '0 0.25em' ) :wikitext(processItem(listText, args[cfg.arg.nowrapitems])) if index == 1 and args[cfg.arg.image] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 0 0 2px') :cssText(args[cfg.arg.imagestyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.image])) end end local function has_list_class(htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, _ in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, cfg.pattern.class) then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles() local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local hlist_styles = add_list_templatestyles('hlist', cfg.hlist_templatestyles) local plainlist_styles = add_list_templatestyles('plainlist', cfg.plainlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar() and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because most navboxes will emit only -- one of these classes [hlist_note] return hlist_styles .. plainlist_styles end local function needsHorizontalLists(border) if border == cfg.keyword.border_subgroup or args[cfg.arg.tracking] == cfg.keyword.tracking_no then return false end return not has_list_class(cfg.pattern.hlist) and not has_list_class(cfg.pattern.plainlist) end local function hasBackgroundColors() for _, key in ipairs({cfg.arg.titlestyle, cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('background', 1, true) then return true end end return false end local function hasBorders() for _, key in ipairs({cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('border', 1, true) then return true end end return false end local function isIllegible() local styleratio = require('Module:Color contrast')._styleratio for key, style in pairs(args) do if tostring(key):match(cfg.pattern.style) then if styleratio{mw.text.unstripNoWiki(style)} < 4.5 then return true end end end return false end local function getTrackingCategories(border) local cats = {} if needsHorizontalLists(border) then table.insert(cats, cfg.category.horizontal_lists) end if hasBackgroundColors() then table.insert(cats, cfg.category.background_colors) end if isIllegible() then table.insert(cats, cfg.category.illegible) end if hasBorders() then table.insert(cats, cfg.category.borders) end return cats end local function renderTrackingCategories(builder, border) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 then return end -- not in template space local subpage = title.subpageText if subpage == cfg.keyword.subpage_doc or subpage == cfg.keyword.subpage_sandbox or subpage == cfg.keyword.subpage_testcases then return end for _, cat in ipairs(getTrackingCategories(border)) do builder:wikitext('[[Category:' .. cat .. ']]') end end local function renderMainTable(border, listnums) local tbl = mw.html.create('table') :addClass(cfg.class.nowraplinks) :addClass(args[cfg.arg.bodyclass]) local state = args[cfg.arg.state] if args[cfg.arg.title] and state ~= cfg.keyword.state_plain and state ~= cfg.keyword.state_off then if state == cfg.keyword.state_collapsed then state = cfg.class.collapsed end tbl :addClass(cfg.class.collapsible) :addClass(state or cfg.class.autocollapse) end tbl:css('border-spacing', 0) if border == cfg.keyword.border_subgroup or border == cfg.keyword.border_none then tbl :addClass(cfg.class.navbox_subgroup) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) else -- regular navbox - bodystyle and style will be applied to the wrapper table tbl :addClass(cfg.class.navbox_inner) :css('background', 'transparent') :css('color', 'inherit') end tbl:cssText(args[cfg.arg.innerstyle]) renderTitleRow(tbl) renderAboveRow(tbl) local listnums_size = #listnums for i, listnum in ipairs(listnums) do renderListRow(tbl, i, listnum, listnums_size) end renderBelowRow(tbl) return tbl end local function add_navbox_styles(hiding_templatestyles) local frame = mw.getCurrentFrame() -- This is a lambda so that it doesn't need the frame as a parameter local function add_user_styles(templatestyles) if templatestyles and templatestyles ~= '' then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } end return '' end -- get templatestyles. load base from config so that Lua only needs to do -- the work once of parser tag expansion local base_templatestyles = cfg.templatestyles local templatestyles = add_user_styles(args[cfg.arg.templatestyles]) local child_templatestyles = add_user_styles(args[cfg.arg.child_templatestyles]) -- The 'navbox-styles' div exists to wrap the styles to work around T200206 -- more elegantly. Instead of combinatorial rules, this ends up being linear -- number of CSS rules. return mw.html.create('div') :addClass(cfg.class.navbox_styles) :wikitext( add_list_styles() .. -- see [hlist_note] applied to 'before base_templatestyles' base_templatestyles .. templatestyles .. child_templatestyles .. table.concat(hiding_templatestyles) ) :done() end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gfind = string.gfind local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gfind(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end function p._navbox(navboxArgs) args = navboxArgs local hiding_templatestyles = move_hiding_templatestyles(args) local listnums = {} for k, _ in pairs(args) do if type(k) == 'string' then local listnum = k:match(cfg.pattern.listnum) if listnum then table.insert(listnums, tonumber(listnum)) end end end table.sort(listnums) local border = mw.text.trim(args[cfg.arg.border] or args[1] or '') if border == cfg.keyword.border_child then border = cfg.keyword.border_subgroup end -- render the main body of the navbox local tbl = renderMainTable(border, listnums) local res = mw.html.create() -- render the appropriate wrapper for the navbox, based on the border param if border == cfg.keyword.border_none then res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode( args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1] ) ) else nav:attr('aria-label', cfg.aria_label) end elseif border == cfg.keyword.border_subgroup then -- We assume that this navbox is being rendered in a list cell of a -- parent navbox, and is therefore inside a div with padding:0em 0.25em. -- We start with a </div> to avoid the padding being applied, and at the -- end add a <div> to balance out the parent's </div> res :wikitext('</div>') :node(tbl) :wikitext('<div>') else res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :addClass(cfg.class.navbox) :addClass(args[cfg.arg.navboxclass]) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) :css('padding', '3px') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode(args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1]) ) else nav:attr('aria-label', cfg.aria_label) end end if (args[cfg.arg.nocat] or cfg.keyword.nocat_false):lower() == cfg.keyword.nocat_false then renderTrackingCategories(res, border) end return striped(tostring(res), border) end function p.navbox(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end args = getArgs(frame, {wrappers = {cfg.pattern.navbox}}) -- Read the arguments in the order they'll be output in, to make references -- number in the right order. local _ _ = args[cfg.arg.title] _ = args[cfg.arg.above] -- Limit this to 20 as covering 'most' cases (that's a SWAG) and because -- iterator approach won't work here for i = 1, 20 do _ = args[format(cfg.arg.group_and_num, i)] _ = args[format(cfg.arg.list_and_num, i)] end _ = args[cfg.arg.below] return p._navbox(args) end return p fa2503f01f91840637f248e4dcbd1763b9cb3561 Module:Navbox/configuration 828 102 539 538 2023-03-31T15:43:50Z 17ademoladav 2 1 revision imported Scribunto text/plain return { aria_label = 'Navbox', nowrap_item = '%s<span class="nowrap">%s</span>', templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' } }, hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', -- do not localize marker table marker = { oddeven = '\127_ODDEVEN_\127', restart = '\127_ODDEVEN0_\127', regex = '\127_ODDEVEN(%d?)_\127' }, category = { orphan = '[[Category:Navbox orphans]]', horizontal_lists = 'Navigational boxes without horizontal lists', background_colors = 'Navboxes using background colours', illegible = 'Potentially illegible navboxes', borders = 'Navboxes using borders', }, keyword = { border_subgroup = 'subgroup', border_child = 'child', border_none = 'none', evenodd_swap = 'swap', navbar_off = 'off', navbar_plain = 'plain', nocat_false = 'false', nowrapitems_yes = 'yes', orphan_yes = 'yes', state_collapsed = 'collapsed', state_off = 'off', state_plain = 'plain', subpage_doc = 'doc', subpage_sandbox = 'sandbox', subpage_testcases = 'testcases', tracking_no = 'no' }, class = { autocollapse = 'autocollapse', collapsible = 'mw-collapsible', collapsed = 'mw-collapsed', -- Warning navbox = 'navbox', -- WMF currently hides 'navbox' from mobile, -- so you probably shouldn't change the navbox class. navbox_abovebelow = 'navbox-abovebelow', navbox_group = 'navbox-group', navbox_image = 'navbox-image', navbox_inner = 'navbox-inner', navbox_list = 'navbox-list', navbox_list_with_group = 'navbox-list-with-group', navbox_part = 'navbox-', -- do not l10n navbox_styles = 'navbox-styles', navbox_subgroup = 'navbox-subgroup', navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below navbox_odd_part = 'odd', -- do not l10n navbox_even_part = 'even', -- do not l10n nomobile = 'nomobile', nowraplinks = 'nowraplinks', noviewer = 'noviewer' -- used to remove images from MediaViewer }, pattern = { listnum = '^list(%d+)$', class = 'class', sandbox = '/sandbox$', navbox = 'Template:Navbox', nowrap = '^<span class="nowrap">', style = 'style$', navbox_title = '<th[^>]*"navbox%-title"', hlist = 'hlist', plainlist = 'plainlist', }, arg = { above = 'above', aboveclass = 'aboveclass', abovestyle = 'abovestyle', basestyle = 'basestyle', bodyclass = 'bodyclass', bodystyle = 'bodystyle', border = 'border', below = 'below', belowclass = 'belowclass', belowstyle = 'belowstyle', evenodd = 'evenodd', evenstyle = 'evenstyle', group1 = 'group1', group2 = 'group2', group_and_num = 'group%d', groupstyle_and_num = 'group%dstyle', groupclass = 'groupclass', groupstyle = 'groupstyle', groupwidth = 'groupwidth', innerstyle = 'innerstyle', image = 'image', imageclass = 'imageclass', imageleft = 'imageleft', imageleftstyle = 'imageleftstyle', imagesetyle = 'imagestyle', list_and_num = 'list%d', listclass_and_num = 'list%dclass', liststyle_and_num = 'list%dstyle', list1padding = 'list1padding', listclass = 'listclass', listpadding = 'listpadding', liststyle = 'liststyle', name = 'name', navbar = 'navbar', navboxclass = 'navboxclass', nocat = 'nocat', nowrapitems = 'nowrapitems', oddstyle = 'oddstyle', orphan = 'orphan', state = 'state', style = 'style', templatestyles = 'templatestyles', child_templatestyles = 'child templatestyles', title = 'title', titleclass = 'titleclass', titlestyle = 'titlestyle', tracking = 'tracking' }, -- names of navbar arguments navbar = { name = 1, fontstyle = 'fontstyle', mini = 'mini' } } 4148736fd32a93636c0413e73ed38afaef065ec9 Template:For loop 10 194 541 540 2023-03-31T15:43:50Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:For loop|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 12b7b7010fe32f888e21bcdfa6a904fc8a925437 Module:For loop 828 195 543 542 2023-03-31T15:43:51Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module implements {{for loop}}. local getArgs = require('Module:Arguments').getArgs local yesno = require('Module:Yesno') local p = {} function p.main(frame) local args = getArgs(frame, { trim = false, removeBlanks = false }) return p._main(args) end function p._main(args) local template = args['call'] or 'void' local calltemplates = yesno(args.substall or "", true) or not mw.isSubsting() local variableParam = args.pv variableParam = tonumber(variableParam) or variableParam or 1 -- fix for positional parameters local variableValPrefix = args.prefix or '' local variableValPostfix = args.postfix or '' local sep = args[1] or '' local constantArgs = p.getConstants(args) local variableVals = p.getVariableVals(args) local result = '' local addSeparator = false; for _, v in ipairs(variableVals) do v = mw.text.trim(v) if #v > 0 or not yesno(args.skipBlanks) then if addSeparator then result = result .. sep end addSeparator = true; local targs = constantArgs targs[variableParam] = variableValPrefix .. v .. variableValPostfix if calltemplates then local output = p.callTemplate(template, targs) if #mw.text.trim(output) == 0 then addSeparator = false end result = result .. output else local makeTemplate = require('Module:Template invocation').invocation result = result .. makeTemplate(template, targs) end end end return result end function p.getConstants(args) local constantArgNums = p.getArgNums(args, 'pc', 'n') local constantArgs = {} for _, num in ipairs(constantArgNums) do local keyArg = 'pc' .. tostring(num) .. 'n' local valArg = 'pc' .. tostring(num) .. 'v' local key = args[keyArg] key = tonumber(key) or key local value = args[valArg] constantArgs[key] = value end return constantArgs end function p.getVariableVals(args) local variableVals = {} if args.start or args.stop or args.by then if args[2] then error("Both start/stop/by and numbered parameters specified") end local start = tonumber(args.start or 1) local stop = tonumber(args.stop or 1) local by = tonumber(args.by or 1) for i = start, stop, by do variableVals [#variableVals + 1] = i end else for i, v in ipairs(args) do if i ~= 1 then variableVals[i - 1] = v end end end return variableVals end function p.getArgNums(args, prefix, suffix) -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix and suffix. local nums = {} local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' for k, _ in pairs(args) do local num = tostring(k):match(pattern) if num then nums[#nums + 1] = tonumber(num) end end table.sort(nums) return nums end function p.callTemplate(template, targs) return mw.getCurrentFrame():expandTemplate{title = template, args = targs} end return p 4ed4682b1fd3fbf2bf0836b46dd19bc0363d40e2 Template:Big 10 79 545 544 2023-03-31T15:43:53Z 17ademoladav 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Large]] f3ac156ee4257dea7f0243e0744b4d6d92927011 Template:Large 10 196 547 546 2023-03-31T15:43:53Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <span style="font-size:120%">{{{1}}}</span><noinclude> {{Documentation}} </noinclude> 8ba6ec8c3178e22dc1f05aa239df8a2b052be668 Template:Cite Legislation AU 10 197 549 548 2023-03-31T15:43:54Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{ #switch: {{{2}}} | act = {{#ifeq: {{{5|0}}} | 0 | ''[https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/consol_act/{{{3}}}/ {{{4}}}]'' ({{{1}}}) | ''{{{4}}}'' ({{{1}}}) [https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/consol_act/{{{3}}}/s{{lc:{{{5}}}}}.html s&nbsp;{{{5}}}] }} | num_act = {{#ifeq: {{{5|0}}} | 0 | ''[https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/num_act/{{{3}}}/ {{{4}}}]'' ({{{1}}}) | ''{{{4}}}'' ({{{1}}}) [https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/num_act/{{{3}}}/s{{lc:{{{5}}}}}.html s&nbsp;{{{5}}}] }} | hist_act = {{#ifeq: {{{5|0}}} | 0 | ''[https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/hist_act/{{{3}}}.pdf {{{4}}}]'' ({{{1}}}) | ''{{{4}}}'' ({{{1}}}) [https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/hist_act/{{{3}}}.pdf s&nbsp;{{{5}}}] }} | reg = {{#ifeq: {{{5|0}}} | 0 | ''[https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/consol_reg/{{{3}}}/ {{{4}}}]'' ({{{1}}}) | ''{{{4}}}'' ({{{1}}}) [https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/consol_reg/{{{3}}}/s{{lc:{{{5}}}}}.html r&nbsp;{{{5}}}] }} | num_reg = {{#ifeq: {{{5|0}}} | 0 | ''[https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/num_reg/{{{3}}}/ {{{4}}}]'' ({{{1}}}) | ''{{{4}}}'' ({{{1}}}) [https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/num_reg/{{{3}}}/s{{lc:{{{5}}}}}.html r&nbsp;{{{5}}}] }} | bill = [https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/bill/{{{3}}} {{{4}}}] ({{{1}}}) | memo = [https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/bill_em/{{{3}}}/memo_{{{5|0}}}.html Explanatory Memorandum, {{{4}}}] ({{{1}}}) {{{5|}}} | repealed_act = {{#ifeq: {{{5|0}}} | 0 | ''[https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/repealed_act/{{{3}}}/ {{{4}}}]'' ({{{1}}}) | ''{{{4}}}'' ({{{1}}}) [https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/repealed_act/{{{3}}}/s{{lc:{{{5}}}}}.html s&nbsp;{{{5}}}] }} | repealed_reg = {{#ifeq: {{{5|0}}} | 0 | ''[https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/repealed_reg/{{{3}}}/ {{{4}}}]'' ({{{1}}}) | ''{{{4}}}'' ({{{1}}}) [https://www.austlii.edu.au/au/legis/{{lc:{{{1}}}}}/repealed_reg/{{{3}}}/s{{lc:{{{5}}}}}.html r&nbsp;{{{5}}}] }} }}<noinclude> {{documentation}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --> <templatedata> { "params": { "1": { "label": "Jurisdiction", "description": "In all cases jurisdiction will be one of Cth (for federal legislation) or ACT, NSW, NT, Qld, SA, Tas, Vic or WA (for state and territory legislation).", "type": "string", "required": true }, "2": { "label": "Legislation type", "description": "One of act, num_act, hist_act, reg, num_reg, bill, memo, repealed_act, repealed_reg", "type": "string", "required": true }, "3": { "label": "Short Name", "description": "Appears in the AustLII URL", "example": "ca1968133", "required": true }, "4": { "label": "Title", "description": "For the citation", "example": "Copyright Act 1968", "required": true }, "5": { "label": "Pinpoint reference", "example": "41a" } }, "description": "This template produces links to a variety of different legislation resources located on the [[AustLII]] site. Formatting is designed to be in compliance with the [[Australian Guide to Legal Citation]].", "paramOrder": [ "1", "2", "3", "4", "5" ] } </templatedata></noinclude> b4da41f608b306c650b0314d6e46c047eb38c2c7 Template:Post-nominals/AUS 10 198 551 550 2023-03-31T15:43:55Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#switch: {{{1}}} | AAM = [[Australian Antarctic Medal|AAM]] | AC = [[Companion of the Order of Australia|AC]] | ACm = [[Companion of the Order of Australia|AC (Mil)]] | ACh = [[Honorary Companion of the Order of Australia|AC]] | AD = [[Dame of the Order of Australia|AD]] | ADh = [[Honorary Dame of the Order of Australia|AD]] | AFSM = [[Australian Fire Service Medal|AFSM]] | AK = [[Knight of the Order of Australia|AK]] | AKh = [[Honorary Knight of the Order of Australia|AK]] | AM = [[Member of the Order of Australia|AM]] | AMg = [[Member of the Order of Australia|AM (Gen)]] | AMm = [[Member of the Order of Australia|AM (Mil)]] | AMh = [[Honorary Member of the Order of Australia|AM]] | AO = [[Officer of the Order of Australia|AO]] | AOg = [[Officer of the Order of Australia|AO (Gen)]] | AOm = [[Officer of the Order of Australia|AO (Mil)]] | AOh = [[Honorary Officer of the Order of Australia|AO]] | APM = [[Australian Police Medal|APM]] | ASM = [[Ambulance Service Medal (Australia)|ASM]] | BM = [[Bravery Medal (Australia)|BM]] | CD = [[Canadian Forces Decoration|CD]] | C.D. = [[Canadian Forces Decoration|C.D.]] | CF = [[Churchill Fellow|CF]] | CSC = [[Conspicuous Service Cross (Australia)|CSC]] | CSC1 = [[Conspicuous Service Cross (Australia)|CSC]] & [[Medal bar|Bar]] | CSM = [[Conspicuous Service Medal|CSM]] | CV = [[Cross of Valour (Australia)|CV]] | DSC = [[Distinguished Service Cross (Australia)|DSC]] | DSCa = [[Distinguished Service Cross (Australia)|DSC]] | DSCuk = [[Distinguished Service Cross (United Kingdom)|DSC]] | DSC1 = [[Distinguished Service Cross (United Kingdom)|DSC]] & [[Medal bar|Bar]] | DSC2 = [[Distinguished Service Cross (United Kingdom)|DSC]] & [[Medal bar|Two Bars]] | DSM = [[Distinguished Service Medal (Australia)|DSM]] | DSMuk = [[Distinguished Service Medal (United Kingdom)|DSM]] | ESM = [[Emergency Services Medal (Australia)|ESM]] | MG = [[Medal for Gallantry|MG]] | MP = [[Member of parliament#Australia|MP]] | NSC = [[Nursing Service Cross (Australia)|NSC]] | OAM = [[Medal of the Order of Australia|OAM]] | OAMg = [[Medal of the Order of Australia|OAM (Gen)]] | OAMm = [[Medal of the Order of Australia|OAM (Mil)]] | PSM = [[Public Service Medal (Australia)|PSM]] | SoC = [[Star of Courage (Australia)|SC]] | SG = [[Star of Gallantry|SG]] | VC = [[Victoria Cross for Australia|VC]] | ADC = [[Aide de Camp|ADC]] | ADC(P) = [[Personal Aide-de-Camp|ADC(P)]] | AE = [[Air Efficiency Award|AE]] | AFC = [[Air Force Cross (United Kingdom)|AFC]] | AFC1 = [[Air Force Cross (United Kingdom)|AFC]] & [[Medal bar|Bar]] | AFM = [[Air Force Medal|AFM]] | ARRC = [[Royal Red Cross|ARRC]] | AsstChStJ = [[Assistant Chaplin of The Most Venerable Order of the Hospital of Saint John of Jerusalem|AsstChStJ]] | BEM = [[British Empire Medal|BEM]] | Bart = [[Baronet|Bart]] | Bt = [[Baronet|Bt]] | Btss = [[Baronet|Btss]] | CB = [[Companion of the Order of the Bath|CB]] | CBE = [[Commander of the Order of the British Empire|CBE]] | CBEh = [[Commander of the Order of the British Empire|CBE]] | CChem = [[Chartered Chemist|CChem]] | CGM = [[Conspicuous Gallantry Medal|CGM]] | CH = [[Companion of the Order of the Companions of Honour|CH]] | CIE = [[Companion of the Order of the Indian Empire|CIE]] | CMG = [[Companion of the Order of St Michael and St George|CMG]] | CNZM = [[Companion of the New Zealand Order of Merit|CNZM]] | CPM = [[Colonial Police Medal|CPM]] | CSI = [[Companion of the Order of the Star of India|CSI]] | CStJ = [[Commander of the Most Venerable Order of the Hospital of Saint John of Jerusalem|CStJ]] | ChStJ = [[Chaplain of the Most Venerable Order of the Hospital of Saint John of Jerusalem|ChStJ]] | CVO = [[Commander of the Royal Victorian Order|CVO]] | DBE = [[Dame Commander of the Order of the British Empire|DBE]] | DCB = [[Dame Commander of the Order of the Bath|DCB]] | DCIE = [[Dame Commander of the Order of the Indian Empire|DCIE]] | DCM = [[Distinguished Conduct Medal|DCM]] | DCM1 = [[Distinguished Conduct Medal|DCM]] & [[Medal bar|Bar]] | DCMG = [[Dame Commander of the Order of St Michael and St George|DCMG]] | DCVO = [[Dame Commander of the Royal Victorian Order|DCVO]] | DFC = [[Distinguished Flying Cross (United Kingdom)|DFC]] | DFC1 = [[Distinguished Flying Cross (United Kingdom)|DFC]] & [[Medal bar|Bar]] | DFC2 = [[Distinguished Flying Cross (United Kingdom)|DFC]] & [[Medal bar|Two Bars]] | DFM = [[Distinguished Flying Medal|DFM]] | DFM1 = [[Distinguished Flying Medal|DFM]] & [[Medal bar|Bar]] | DFM2 = [[Distinguished Flying Medal|DFM]] & [[Medal bar|Two Bars]] | DL = [[Deputy Lieutenant|DL]] | DSO = [[Companion of the Distinguished Service Order|DSO]] | DSO1 = [[Companion of the Distinguished Service Order|DSO]] & [[Medal Bar|Bar]] | DSO2 = [[Companion of the Distinguished Service Order|DSO]] & [[Medal bar|Two Bars]] | DStJ = [[Dame of Justice of the Most Venerable Order of the Hospital of Saint John of Jerusalem|DStJ]] | DStJg = [[Dame of Grace of the Most Venerable Order of the Hospital of Saint John of Jerusalem|DStJ]] | ED = [[Efficiency Decoration|ED]] | ERD = [[Emergency Reserve Decoration|ERD]] | EsqStJ = [[Esquire of the Most Venerable Order of the Hospital of Saint John of Jerusalem|EsqStJ]] | FAA = [[Fellow of the Australian Academy of Science|FAA]] | FAAL = [[Australian Academy of Law#Fellows|FAAL]] | FACE = [[Fellow of the Australian College of Educators|FACE]] | FAHA = [[Fellow of the Australian Academy of the Humanities|FAHA]] | FAHMS = [[Fellow of the Australian Academy of Health and Medical Sciences|FAHMS]] | FAICD = [[Fellow of the Australian Institute of Company Directors|FAICD]] | FASSA = [[Fellow of the Academy of the Social Sciences in Australia|FASSA]] | FMedSci= [[Fellow of the Academy of Medical Sciences|FMedSci]] | FRACI = [[Fellow of the Royal Australian Chemical Institute|FRACI]] | FRACP = [[Fellow of the Royal Australasian College of Physicians|FRACP]] | FRACS = [[Fellow of the Royal Australasian College of Surgeons|FRACS]] | FRAeS = [[Fellow of the Royal Aeronautical Society|FRAeS]] | FRCP = [[Fellow of the Royal College of Physicians|FRCP]] | FRCPE = [[Fellow of the Royal College of Physicians of Edinburgh|FRCPE]] | FRCS = [[Fellow of the Royal College of Surgeons|FRCS]] | FRMS = [[Royal Microscopical Society|FRMS]] | FRS = [[Fellow of the Royal Society|FRS]] | FRSA = [[Fellow of the Royal Society of Arts|FRSA]] | FRSN = [[Fellow of the Royal Society of New South Wales|FRSN]] | FRSNZ = [[Fellow of the Royal Society of New Zealand|FRSNZ]] | FRZS = [[Royal Zoological Society of New South Wales|FRZS]] | FTSE = [[Fellow of the Australian Academy of Technological Sciences and Engineering|FTSE]] | GBE = [[Knight Grand Cross of the Order of the British Empire|GBE]] | GBEf = [[Dame Grand Cross of the Order of the British Empire|GBE]] | GC = [[George Cross|GC]] | GCB = [[Knight Grand Cross of the Order of the Bath|GCB]] | GCBf = [[Dame Grand Cross of the Order of the Bath|GCB]] | GCIE = [[Knight Grand Cross of the Order of the Indian Empire|GCIE]] | GCIEf = [[Dame Grand Cross of the Order of the Indian Empire|GCIE]] | GCMG = [[Knight Grand Cross of the Order of St Michael and St George|GCMG]] | GCMGf = [[Dame Grand Cross of the Order of St Michael and St George|GCMG]] | GCSI = [[Knight Grand Cross of the Order of the Star of India|GCSI]] | GCSIf = [[Dame Grand Cross of the Order of the Star of India|GCSI]] | GCStJ = [[Bailiff Grand Cross of the Most Venerable Order of the Hospital of Saint John of Jerusalem|GCStJ]] | GCStJf = [[Dame Grand Cross of the Most Venerable Order of the Hospital of Saint John of Jerusalem|GCStJ]] | GCVO = [[Knight Grand Cross of the Royal Victorian Order|GCVO]] | GCVOf = [[Dame Grand Cross of the Royal Victorian Order|GCVO]] | GM = [[George Medal|GM]] | GM1 = [[George Medal|GM]] & [[Medal bar|Bar]] | ISO = [[Imperial Service Order|ISO]] | JP = [[Justice of the peace#Australia|JP]] | KBE = [[Knight Commander of the Order of the British Empire|KBE]] | KC = [[King's Counsel|KC]] | KCB = [[Knight Commander of the Order of the Bath|KCB]] | KCIE = [[Knight Commander of the Order of the Indian Empire|KCIE]] | KCMG = [[Knight Commander of the Order of St Michael and St George|KCMG]] | KCVO = [[Knight Commander of the Royal Victorian Order|KCVO]] | KG = [[Knight of the Order of the Garter|KG]] | KP = [[Knight of the Order of Saint Patrick|KP]] | KCSI = [[Knight Commander of the Order of the Star of India|KCSI]] | DCSI = [[Dame Commander of the Order of the Star of India|DCSI]] | KStJ = [[Knight of Justice of the Most Venerable Order of the Hospital of Saint John of Jerusalem|KStJ]] | KStJg = [[Knight of Grace of the Most Venerable Order of the Hospital of Saint John of Jerusalem|KStJ]] | KT = [[Knight of the Order of the Thistle|KT]] | LG = [[Lady Companion of the Order of the Garter|LG]] | LT = [[Lady Companion of the Order of the Thistle|LT]] | LVO = [[Lieutenant of the Royal Victorian Order|LVO]] | MBE = [[Member of the Order of the British Empire|MBE]] | MC = [[Military Cross|MC]] | MC1 = [[Military Cross|MC]] & [[Medal bar|Bar]] | MC2 = [[Military Cross|MC]] & [[Medal bar|Two Bars]] | MM = [[Military Medal|MM]] | MM1 = [[Military Medal|MM]] & [[Medal bar|Bar]] | MM2 = [[Military Medal|MM]] & [[Medal bar|Two Bars]] | MM3 = [[Military Medal|MM]] & [[Medal bar|Three Bars]] | MVO = [[Member of the Royal Victorian Order|MVO]] | OBE = [[Officer of the Order of the British Empire|OBE]] | OM = [[Member of the Order of Merit|OM]] | OStJ = [[Officer of the Most Venerable Order of the Hospital of Saint John of Jerusalem|OStJ]] | PC = [[Her Majesty's Most Honourable Privy Council|PC]] | SC = [[Senior Counsel|SC]] | QC = [[Queen's Counsel|QC]] | QGM = [[Queen's Gallantry Medal|QGM]] | QFSM = [[Queen's Fire Service Medal for Gallantry|QFSM]] | QPM = [[Queen's Police Medal for Gallantry|QPM]] | QFSMd = [[Queen's Fire Service Medal for Distinguished Service|QFSM]] | QPMd = [[Queen's Police Medal for Distinguished Service|QPM]] | RAN = [[Royal Australian Navy|RAN]] | RAAF = [[Royal Australian Air Force|RAAF]] | RANR = [[Royal Australian Naval Reserve|RANR]] | RFD = [[Reserve Force Decoration|RFD]] | RRC = [[Royal Red Cross|RRC]] | RVM = [[Royal Victorian Medal|RVM]] | SBStJ = [[Serving Brother of the Most Venerable Order of the Hospital of Saint John of Jerusalem|SBStJ]] | SSStJ = [[Serving Sister of the Most Venerable Order of the Hospital of Saint John of Jerusalem|SSStJ]] | Sub-ChStJ = [[Sub-Chaplain of the Most Venerable Order of the Hospital of Saint John of Jerusalem|Sub-ChStJ]] | TD = [[Territorial Decoration|TD]] | VCi = [[Victoria Cross|VC]] | VD = [[Colonial Auxiliary Forces Officers' Decoration|VD]] | * = [[Medal bar|*]] | SSI = [[Star of the Solomon Islands|SSI]] | GCL = [[Grand Companion of the Order of Logohu|GCL]] | QSO = [[Companion of the Queen's Service Order|QSO]] | CFA = [[Chartered Financial Analyst|CFA]] | C.F.A. = [[Chartered Financial Analyst|C.F.A.]] | AAM, = [[Australian Antarctic Medal|AAM]], | AC, = [[Companion of the Order of Australia|AC]], | ACh, = [[Honorary Companion of the Order of Australia|AC]], | AD, = [[Dame of the Order of Australia|AD]], | ADh, = [[Honorary Dame of the Order of Australia|AD]], | AFSM, = [[Australian Fire Service Medal|AFSM]], | AK, = [[Knight of the Order of Australia|AK]], | AKh, = [[Honorary Knight of the Order of Australia|AK]], | AM, = [[Member of the Order of Australia|AM]], | AMh, = [[Honorary Member of the Order of Australia|AM]], | AO, = [[Officer of the Order of Australia|AO]], | AOh, = [[Honorary Officer of the Order of Australia|AO]], | APM, = [[Australian Police Medal|APM]], | ASM, = [[Ambulance Service Medal (Australia)|ASM]], | BM, = [[Bravery Medal (Australia)|BM]], | CSC, = [[Conspicuous Service Cross (Australia)|CSC]], | CSM, = [[Conspicuous Service Medal|CSM]], | CV, = [[Cross of Valour (Australia)|CV]], | DSC, = [[Distinguished Service Cross (Australia)|DSC]], | DSCa, = [[Distinguished Service Cross (Australia)|DSC]], | DSCuk, = [[Distinguished Service Cross (United Kingdom)|DSC]], | DSC1, = [[Distinguished Service Cross and Bar (United Kingdom)|DSC]] & [[Medal bar|Bar]], | DSC2, = [[Distinguished Service Cross and two Bars (United Kingdom)|DSC]] & [[Medal bar|Two Bars]], | DSM, = [[Distinguished Service Medal (Australia)|DSM]], | DSMuk, = [[Distinguished Service Medal (United Kingdom)|DSM]], | ESM, = [[Emergency Services Medal (Australia)|ESM]], | MG, = [[Medal for Gallantry|MG]], | MP, = [[Member of Parliament|MP]], | NSC, = [[Nursing Service Cross (Australia)|NSC]], | OAM, = [[Medal of the Order of Australia|OAM]], | PSM, = [[Public Service Medal (Australia)|PSM]], | SC, = [[Star of Courage (Australia)|SC]], | SG, = [[Star of Gallantry|SG]], | VC, = [[Victoria Cross for Australia|VC]], | ADC, = [[Aide de Camp|ADC]], | ADC(P),= [[Personal Aide-de-Camp|ADC(P)]], | AE, = [[Air Efficiency Award|AE]], | AFC, = [[Air Force Cross (United Kingdom)|AFC]], | AFC1, = [[Air Force Cross (United Kingdom)|AFC]] & [[Medal bar|Bar]], | AFM, = [[Air Force Medal|AFM]], | ARRC, = [[Royal Red Cross|ARRC]], | AsstChStJ, = [[Assistant Chaplin of The Most Venerable Order of the Hospital of Saint John of Jerusalem|AsstChStJ]], | BEM, = [[British Empire Medal|BEM]], | Bart, = [[Baronet|Bart]], | Bt, = [[Baronet|Bt]], | Btss, = [[Baronet|Btss]], | CB, = [[Companion of the Order of the Bath|CB]], | CBE, = [[Commander of the Order of the British Empire|CBE]], | CBEh, = [[Commander of the Order of the British Empire|CBE]], | CGM, = [[Conspicuous Gallantry Medal|CGM]], | CH, = [[Companion of the Order of the Companions of Honour|CH]], | CIE, = [[Companion of the Order of the Indian Empire|CIE]], | CMG, = [[Companion of the Order of St Michael and St George|CMG]], | CPM, = [[Colonial Police Medal|CPM]], | CStJ, = [[Commander of the Most Venerable Order of the Hospital of Saint John of Jerusalem|CStJ]], | ChStJ, = [[Chaplain of the Most Venerable Order of the Hospital of Saint John of Jerusalem|ChStJ]], | CVO, = [[Commander of the Royal Victorian Order|CVO]], | DBE, = [[Dame Commander of the Order of the British Empire|DBE]], | DCB, = [[Dame Commander of the Order of the Bath|DCB]], | DCIE, = [[Dame Commander of the Order of the Indian Empire|DCIE]], | DCM, = [[Distinguished Conduct Medal|DCM]], | DCMG, = [[Dame Commander of the Order of St Michael and St George|DCMG]], | DCVO, = [[Dame Commander of the Royal Victorian Order|DCVO]], | DFC, = [[Distinguished Flying Cross (United Kingdom)|DFC]], | DFC1, = [[Distinguished Flying Cross (United Kingdom)|DFC]] & [[Medal bar|Bar]], | DFC2, = [[Distinguished Flying Cross (United Kingdom)|DFC]] & [[Medal bar|Two Bars]], | DFM, = [[Distinguished Flying Medal|DFM]], | DFM1, = [[Distinguished Flying Medal|DFM]] & [[Medal bar|Bar]], | DFM2, = [[Distinguished Flying Medal|DFM]] & [[Medal bar|Two Bars]], | DL, = [[Deputy Lieutenant|DL]], | DSO, = [[Companion of the Distinguished Service Order|DSO]], | DSO1, = [[Companion of the Distinguished Service Order|DSO]] & [[Medal bar|Bar]], | DSO2, = [[Companion of the Distinguished Service Order|DSO]] & [[Medal bar|Two Bars]], | DStJ, = [[Dame of Justice of the Most Venerable Order of the Hospital of Saint John of Jerusalem|DStJ]], | DStJg, = [[Dame of Grace of the Most Venerable Order of the Hospital of Saint John of Jerusalem|DStJ]], | ED, = [[Efficiency Decoration|ED]], | ERD, = [[Emergency Reserve Decoration|ERD]], | EsqStJ,= [[Esquire of the Most Venerable Order of the Hospital of Saint John of Jerusalem|EsqStJ]], | FAA, = [[Fellow of the Australian Academy of Science|FAA]], | FAHMS, = [[Fellow of the Australian Academy of Health and Medical Sciences|FAHMS]], | FAICD, = [[Fellow of the Australian Institute of Company Directors|FAICD]], | FRACP, = [[Fellow of the Royal Australasian College of Physicians|FRACP]], | FRCP, = [[Fellow of the Royal College of Physicians|FRCP]], | FRCPE, = [[Fellow of the Royal College of Physicians of Edinburgh|FRCPE]], | FRS, = [[Fellow of the Royal Society|FRS]], | FRSN, = [[Fellow of the Royal Society of New South Wales|FRSN]], | FRSNZ, = [[Fellow of the Royal Society of New Zealand|FRSNZ]], | FTSE, = [[Fellow of the Australian Academy of Technological Sciences and Engineering|FTSE]], | GBE, = [[Knight Grand Cross of the Order of the British Empire|GBE]], | GBEf, = [[Dame Grand Cross of the Order of the British Empire|GBE]], | GC, = [[George Cross|GC]], | GCB, = [[Knight Grand Cross of the Order of the Bath|GCB]], | GCBf, = [[Dame Grand Cross of the Order of the Bath|GCB]], | GCIE, = [[Knight Grand Cross of the Order of the Indian Empire|GCIE]], | GCIEf, = [[Dame Grand Cross of the Order of the Indian Empire|GCIE]], | GCMG, = [[Knight Grand Cross of the Order of St Michael and St George|GCMG]], | GCMGf, = [[Dame Grand Cross of the Order of St Michael and St George|GCMG]], | GCStJ, = [[Bailiff Grand Cross of the Most Venerable Order of the Hospital of Saint John of Jerusalem|GCStJ]], | GCStJf,= [[Dame Grand Cross of the Most Venerable Order of the Hospital of Saint John of Jerusalem|GCStJ]], | GCVO, = [[Knight Grand Cross of the Royal Victorian Order|GCVO]], | GCVOf, = [[Dame Grand Cross of the Royal Victorian Order|GCVO]], | GM, = [[George Medal|GM]], | JP, = [[Justice of the Peace|JP]], | KBE, = [[Knight Commander of the Order of the British Empire|KBE]], | KC, = [[King's Counsel|KC]], | KCB, = [[Knight Commander of the Order of the Bath|KCB]], | KCIE, = [[Knight Commander of the Order of the Indian Empire|KCIE]], | KCMG, = [[Knight Commander of the Order of St Michael and St George|KCMG]], | KCVO, = [[Knight Commander of the Royal Victorian Order|KCVO]], | KG, = [[Knight of the Order of the Garter|KG]], | KP, = [[Knight of the Order of Saint Patrick|KP]], | KStJ, = [[Knight of Justice of the Most Venerable Order of the Hospital of Saint John of Jerusalem|KStJ]], | KStJg, = [[Knight of Grace of the Most Venerable Order of the Hospital of Saint John of Jerusalem|KStJ]], | KT, = [[Knight of the Order of the Thistle|KT]], | LG, = [[Lady Companion of the Order of the Garter|LG]], | LT, = [[Lady Companion of the Order of the Thistle|LT]], | LVO, = [[Lieutenant of the Royal Victorian Order|LVO]], | MBE, = [[Member of the Order of the British Empire|MBE]], | MC, = [[Military Cross|MC]], | MM, = [[Military Medal|MM]], | MVO, = [[Member of the Royal Victorian Order|MVO]], | OBE, = [[Officer of the Order of the British Empire|OBE]], | OM, = [[Member of the Order of Merit|OM]], | OStJ, = [[Officer of the Most Venerable Order of the Hospital of Saint John of Jerusalem|OStJ]], | PC, = [[Her Majesty's Most Honourable Privy Council|PC]], | QC, = [[Queen's Counsel|QC]], | QGM, = [[Queen's Gallantry Medal|QGM]], | QFSM, = [[Queen's Fire Service Medal for Gallantry|QFSM]], | QPM, = [[Queen's Police Medal for Gallantry|QPM]], | QFSMd, = [[Queen's Fire Service Medal for Distinguished Service|QFSM]], | QPMd, = [[Queen's Police Medal for Distinguished Service|QPM]], | RAN = [[Royal Australian Navy|RAN]] | RANR = [[Royal Australian Naval Reserve|RANR]] | RD, = [[Decoration for Officers of the Royal Naval Reserve|RD]], | RFD, = [[Reserve Force Decoration|RFD]], | RRC, = [[Royal Red Cross|RRC]], | RVM, = [[Royal Victorian Medal|RVM]], | SBStJ, = [[Serving Brother of the Most Venerable Order of the Hospital of Saint John of Jerusalem|SBStJ]], | SSStJ, = [[Serving Sister of the Most Venerable Order of the Hospital of Saint John of Jerusalem|SSStJ]], | Sub-ChStJ, = [[Sub-Chaplain of the Most Venerable Order of the Hospital of Saint John of Jerusalem|Sub-ChStJ]], | TD, = [[Territorial Decoration|TD]], | VCi, = [[Victoria Cross|VC]], | VD, = [[Volunteer Officers' Decoration|VD]], | *, = [[Medal bar|*]], | SSI, = [[Star of the Solomon Islands|SSI]], | GCL, = [[Grand Companion of the Order of Logohu|GCL]], | QSO, = [[Companion of the Queen's Service Order|QSO]], | OLY, = [[Competitor at the Olympic Games|OLY]] }}<noinclude> {{documentation}} </noinclude> d20d155d6094556b283947b6a9907cf304c3b9b9 Template:Tlc 10 199 553 552 2023-03-31T15:43:56Z 17ademoladav 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:Template link code]] {{Redirect category shell| {{R from template shortcut}} {{R from high-use template}} {{R from move}} }} 48ef4a029c0e27cccb1148a29fb8b7ccb211a4a2 Template:Parameter names example 10 26 555 554 2023-03-31T15:43:57Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly>{{#invoke:Parameter names example|main}}</includeonly><noinclude> {{Documentation}} </noinclude> de1e29d6ebc113e9d1649ea6a976625885db8a2f Template:Organization infoboxes 10 87 557 556 2023-03-31T15:43:59Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{Navbox | name = Organization infoboxes | state = {{{state<includeonly>|expanded</includeonly>}}} | bodyclass = hlist | title = [[Wikipedia:Template index|Wikipedia templates]]: [[organization]] [[Template:Infobox|infoboxes]] | above = [[Wikipedia:Manual of Style/Infoboxes]] | group1 = General | list1 = * {{Tl|Infobox organization}} * {{Tl|Infobox official post}} * {{tl|Infobox criminal organization}} * {{tl|Infobox fictional organisation}} | group2 = {{longitem|Government<br/>and politics}} | list2 = * {{Tl|Infobox government}} * {{Tl|Infobox government agency}} * {{Tl|Infobox legislature}} * {{Tl|Infobox political party}} * {{Tl|Infobox court}} * {{Tl|Infobox detention facility}} * {{tl|Infobox fire department}} * {{Tl|Infobox law enforcement agency}} * {{Tl|Infobox space agency}} | group3 = Military | list3 = * {{Tl|Infobox national military}} * {{Tl|Infobox military unit}} * {{tl|Infobox military rank}} * {{Tl|Infobox military gear}} | group4 = Religion | list4 = * {{Tl|Infobox religious group}} * {{Tl|Infobox Christian denomination}} * {{Tl|Infobox diocese}} * {{Tl|Infobox church}} * {{Tl|Infobox monastery}} | group5 = People | list5 = * {{Tl|Infobox ethnic group}} * {{Tl|Infobox caste}} * {{Tl|Infobox clan}} * {{Tl|Infobox family}} * {{Tl|Infobox iwi}} * {{Tl|Infobox hereditary title}} * {{Tl|Infobox monarchy}} * {{Tl|Infobox officeholder}} * {{Tl|Infobox tribe}} | group6 = {{longitem|Typically<br/>non-profit}} | list6 = * {{tl|Infobox hospital}} * {{Tl|Infobox institute}} * {{Tl|Infobox laboratory}}{{smallsup|1}} * {{tl|Infobox museum}} * {{Tl|Infobox observatory}} * {{Tl|Infobox school}} * {{tl|Infobox school district}} * {{Tl|Infobox university}}{{smallsup|2}} | group7 = Publications | list7 = * {{Tl|Infobox journal}} * {{Tl|Infobox magazine}} * {{Tl|Infobox newspaper}} * {{Tl|Infobox publisher}} | group8 = Business | list8 = * {{Tl|Infobox company}} * {{tl|Infobox brewery}} * {{Tl|Infobox law firm}} * {{tl|Infobox restaurant}} * {{tl|Infobox website}} – ''type of business or publication'' | group9 = Distinctions | list9 = * {{Tl|Infobox order}} * {{Tl|Infobox fraternity}} * {{Tl|Infobox Grand Lodge}} | group10 = Subtemplates | list10 = * '''Coordinates'''&nbsp;{{Tl|coord}} * '''Dates''' ** {{Tl|start date}}}—for {{para|established}}, {{para|founded}}, {{para|opened}} etc. ** {{Tl|end date}}}—for {{para|dissolved}}, {{para|defunct}} * '''Lists''' **{{tl|plainlist}} ** {{tl|flatlist}} ** {{tl|unbulleted list}} * '''Non-English text'''&nbsp;{{Tl|lang}} * '''Website''' ** {{tl|URL}} ** {{tl|Official URL}} ** {{tl|Official website}} * '''Documentation''' ** &nbsp;{{Tl|mf-adr}}}—Address ** &nbsp;{{Tl|UF-hcard-org}}—[[Microformat]]/metadata | below = * {{smallsup|1}} or research institution * {{smallsup|2}} or college * [[:Category:Infobox templates|Category]] * [[Help:Infobox|Help]] * [[Wikipedia:List of infoboxes|List of infoboxes]] }}<noinclude>{{documentation}}</noinclude> 46b42f8c246498861fbe37c456b35324d6642992 Template:Infobox court/doc 10 200 559 558 2023-03-31T15:44:03Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{Documentation subpage}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> {{Lua|Module:Infobox|Module:InfoboxImage|Module:Check for unknown parameters}} {{tlc|{{BASEPAGENAME}}}} can be used to provide at-a-glance information at the start of an article about a court. == Usage == {{Parameter names example | court_name | native_name | image | image_upright | imagesize | alt | caption | image2 | image_upright2 | imagesize2 | alt2 | caption2 | established | dissolved | jurisdiction | location | coordinates | motto | type | authority | appealsto | appealsfrom | terms | positions | budget | language | tribunal-type | website | chiefjudgetitle | chiefjudgename | termstart | termend | termend2 | chiefjudgetitle2 | chiefjudgename2 | termstart2 | termend3 | termend4 | chiefjudgetitle3 | chiefjudgename3 | termstart3 | termend5 | termend6 | division_map | division_map_upright | division_map_size | division_map_alt | division_caption }} <pre style="overflow:auto"> {{Infobox court | court_name = | native_name = <!-- native name of the court, if different --> | image = | image_upright = <!-- [[Wikipedia:Autosizing images|image scaling factor]] for image, if applicable --> | imagesize = Image_upright if preferred | alt = | caption = | image2 = | image_upright2 = | imagesize2 = | alt2 = | caption2 = | established = <!-- use {{start date|YYYY|MM|DD}} --> | dissolved = <!-- use {{end date|YYYY|MM|DD}} --> | jurisdiction = <!-- Official jurisdiction --> | location = <!-- city, state/province, country --> | coordinates = <!-- {{coord|45.000|-122.000|display=inline,title}} --> | motto = | type = <!-- partisan election/non-partisan election/legislative selection/executive selection/co-option/etc --> | authority = <!-- constitution/statute/monarch or | at = --> | appealsto = <!-- appeals from this court go where --> | appealsfrom = <!-- appeals from what other courts are heard by this --> | terms = <!-- length of court term for judges --> | positions = <!-- number of positions/seats on court --> | budget = <!-- amount of annual budget --> | language = | tribunal-type = | website = <!-- official website. Use {{Tl|URL}} --> | chiefjudgetitle = <!-- title of the top judge such as chief justice/senior judge --> | chiefjudgename = <!-- current chief's name --> | termstart = <!-- year current chief became chief --> | termend = <!-- lead position ends --> | termend2 = <!-- jurist term ends --> | chiefjudgetitle2 = <!-- title of the second top judge if applicable --> | chiefjudgename2 = <!-- current deputy chief's name --> | termstart2 = <!-- year current deputy chief became chief --> | termend3 = <!-- lead position ends --> | termend4 = <!-- jurist term ends --> | chiefjudgetitle3 = <!-- title of the second top judge if applicable --> | chiefjudgename3 = <!-- current deputy chief's name --> | termstart3 = <!-- year current deputy chief became chief --> | termend5 = <!-- lead position ends --> | termend6 = <!-- jurist term ends --> | division_map = <!-- image for a map of division separations, if applicable --> | division_map_upright = <!-- [[Wikipedia:Autosizing images|image scaling factor]] for map of division, if applicable --> | division_map_size = <!-- size of division map above, if applicable --> | division_map_alt = <!-- alt text for division map above, if applicable --> | division_caption = }} </pre> {{clear}} == Example == {{Infobox court | court_name = District Court of New South Wales | image = Coat of Arms of New South Wales.svg | alt = Coat of Arms of New South Wales | image2 = SLNSW 479525 22 Court House Darlinghurst front view SH 571.jpg | alt2 = Darlinghurst Courthouse, pictured in 1872, a seat of the District Court | caption2 = [[Darlinghurst Courthouse]], pictured in 1872, a seat of the District Court | established = 1858 | jurisdiction = [[New South Wales]] | location = Full time sittings are held in the [[Sydney central business district|Sydney CBD]], and at [[Parramatta]], [[Penrith, New South Wales|Penrith]], [[Campbelltown, New South Wales|Campbelltown]], [[Newcastle, New South Wales|Newcastle]], [[Gosford]], [[Wollongong]] and [[Lismore, New South Wales|Lismore]]. Part time sittings are held in a range of major regional centres. | type = [[Governor of New South Wales|Vice-regal]] appointment upon nomination by the [[Premier of New South Wales|Premier]] following the advice of the [[Attorney General of New South Wales|Attorney General]] and [[Executive Council of New South Wales|Cabinet]]<!-- partisan election/non-partisan election/legislative selection/executive selection/co-option/etc --> | authority = [[Parliament of New South Wales|New South Wales Parliament]] via the {{Cite Legislation AU|NSW|act||District Court Act 1973}} (formerly the {{Cite Legislation AU|NSW|act||District Courts Act 1858}})<!-- constitution/statute/monarch--> | appealsto = [[Supreme Court of New South Wales]] <!-- appeals from this court go where --> | appealsfrom = [[Local Court of New South Wales]]<!-- appeals from what other courts are heard by this --> | website = [http://www.lawlink.nsw.gov.au/lawlink/district_court/ll_districtcourt.nsf/pages/dc_index www.lawlink.nsw.gov.au/dc]<!-- official website --> | chiefjudgetitle = Chief Judge<!-- title of the top judge such as chief justice/senior judge --> | chiefjudgename = Derek Michael Price {{post-nominals|country=AUS|AM}}<!-- current chief's name --> | termstart = 2014<!-- year current chief became chief --> }} <pre style="overflow:auto"> {{Infobox court | court_name = District Court of New South Wales | image = Coat of Arms of New South Wales.svg | alt = Coat of Arms of New South Wales | image2 = SLNSW 479525 22 Court House Darlinghurst front view SH 571.jpg | alt2 = Darlinghurst Courthouse, pictured in 1872, a seat of the District Court | caption2 = [[Darlinghurst Courthouse]], pictured in 1872, a seat of the District Court | established = 1858 | jurisdiction = [[New South Wales]] | location = Full time sittings are held in the [[Sydney central business district|Sydney CBD]], and at [[Parramatta]], [[Penrith, New South Wales|Penrith]], [[Campbelltown, New South Wales|Campbelltown]], [[Newcastle, New South Wales|Newcastle]], [[Gosford]], [[Wollongong]] and [[Lismore, New South Wales|Lismore]]. Part time sittings are held in a range of major regional centres. | type = [[Governor of New South Wales|Vice-regal]] appointment upon nomination by the [[Premier of New South Wales|Premier]] following the advice of the [[Attorney General of New South Wales|Attorney General]] and [[Executive Council of New South Wales|Cabinet]]<!-- partisan election/non-partisan election/legislative selection/executive selection/co-option/etc --> | authority = [[Parliament of New South Wales|New South Wales Parliament]] via the {{Cite Legislation AU|NSW|act||District Court Act 1973}} (formerly the {{Cite Legislation AU|NSW|act||District Courts Act 1858}})<!-- constitution/statute/monarch--> | appealsto = [[Supreme Court of New South Wales]] <!-- appeals from this court go where --> | appealsfrom = [[Local Court of New South Wales]]<!-- appeals from what other courts are heard by this --> | website = [http://www.lawlink.nsw.gov.au/lawlink/district_court/ll_districtcourt.nsf/pages/dc_index www.lawlink.nsw.gov.au/dc]<!-- official website --> | chiefjudgetitle = Chief Judge<!-- title of the top judge such as chief justice/senior judge --> | chiefjudgename = Derek Michael Price {{post-nominals|country=AUS|AM}}<!-- current chief's name --> | termstart = 2014<!-- year current chief became chief --> }} </pre> {{clear}} == Microformat == {{UF-hcard-org}} == TemplateData == {{TemplateData header}} <templatedata> { "params": { "court_name": {}, "native_name": {}, "image": {}, "image_upright": {}, "imagesize": {}, "caption": {}, "image2": {}, "image_upright2": {}, "imagesize2": {}, "caption2": {}, "dissolved": {}, "coordinates": {}, "motto": {}, "at": {}, "appealsto": { "aliases": [ "appeals" ] }, "appealsfrom": {}, "terms": {}, "budget": {}, "chiefjudgetitle": {}, "chiefjudgename": {}, "termstart": {}, "termend": {}, "termend2": {}, "chiefjudgetitle2": {}, "chiefjudgename2": {}, "termstart2": {}, "termend3": {}, "termend4": {}, "alt": {}, "alt2": {}, "established": {}, "authority": {}, "positions": {}, "language": {}, "tribunal-type": {}, "website": {}, "jurisdiction": {}, "location": {}, "type": {}, "chiefjudgetitle3": {}, "chiefjudgename3": {}, "termstart3": {}, "termend5": {}, "termend6": {}, "division_map": {}, "division_map_upright": {}, "division_map_size": {}, "division_map_alt": {}, "division_caption": {} }, "paramOrder": [ "court_name", "native_name", "image", "image_upright", "imagesize", "alt", "caption", "image2", "image_upright2", "imagesize2", "alt2", "caption2", "established", "dissolved", "coordinates", "motto", "at", "authority", "appealsto", "appealsfrom", "terms", "positions", "budget", "language", "tribunal-type", "website", "chiefjudgetitle", "chiefjudgename", "termstart", "termend", "termend2", "chiefjudgetitle2", "chiefjudgename2", "termstart2", "termend3", "termend4", "jurisdiction", "location", "type", "chiefjudgetitle3", "chiefjudgename3", "termstart3", "termend5", "termend6", "division_map", "division_map_upright", "division_map_size", "division_map_alt", "division_caption" ], "description": "infobox template for courts", "format": "block" } </templatedata> == Tracking categories == * {{clc|Category:Pages using infobox court with unknown parameters}} == See also == * {{tl|Infobox judge}} * {{tl|Infobox U.S. federal court}} {{Organization infoboxes}} <includeonly>{{sandbox other|| <!-- Categories below this line; interwikis at Wikidata --> [[Category:Law infobox templates|Court]] [[Category:Politics and government infobox templates|Court]] [[Category:Templates that add a tracking category|{{PAGENAME}}]] }}</includeonly> c855a40a2a422a78f0ac88f6954e0ab03c61aac0 Template:Hlist/styles.css 10 201 561 560 2023-03-31T15:44:04Z 17ademoladav 2 1 revision imported sanitized-css text/css /* {{pp-protected|reason=match parent|small=yes}} */ /* * hlist styles are defined in core and Minerva and differ in Minerva. The * current definitions here (2023-01-01) are sufficient to override Minerva * without use of the hlist-separated class. The most problematic styles were * related to margin, padding, and the bullet. Check files listed at * [[MediaWiki talk:Common.css/to do#hlist-separated]] */ /* * TODO: When the majority of readership supports it (or some beautiful world * in which grade C support is above the minimum threshold), use :is() */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { /* * don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again * We also want to reset margin-right in Minerva */ margin: 0; display: inline; } /* Display requested top-level lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, /* Display nested lists inline */ .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* TODO: :not() can maybe be used here to remove the later rule. naive test * seems to work. more testing needed. like so: *.hlist dt:not(:last-child)::after { * content: ": "; *} *.hlist dd:not(:last-child)::after, *.hlist li:not(:last-child)::after { * content: " · "; * font-weight: bold; *} */ /* Generate interpuncts */ .hlist dt::after { content: ": "; } .hlist dd::after, .hlist li::after { content: " · "; font-weight: bold; } .hlist dd:last-child::after, .hlist dt:last-child::after, .hlist li:last-child::after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child::before, .hlist dd dt:first-child::before, .hlist dd li:first-child::before, .hlist dt dd:first-child::before, .hlist dt dt:first-child::before, .hlist dt li:first-child::before, .hlist li dd:first-child::before, .hlist li dt:first-child::before, .hlist li li:first-child::before { content: " ("; font-weight: normal; } .hlist dd dd:last-child::after, .hlist dd dt:last-child::after, .hlist dd li:last-child::after, .hlist dt dd:last-child::after, .hlist dt dt:last-child::after, .hlist dt li:last-child::after, .hlist li dd:last-child::after, .hlist li dt:last-child::after, .hlist li li:last-child::after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li::before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child::before, .hlist dt ol > li:first-child::before, .hlist li ol > li:first-child::before { content: " (" counter(listitem) "\a0"; } 8c9dd9c9c00f30eead17fe10f51d183333e81f33 Template:Mbox 10 22 563 562 2023-03-31T15:44:04Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#invoke:Message box|mbox}}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 5bfb2becf8bed35974b47e3ff8660dc14bee40c7 Template:PAGENAMEBASE 10 74 565 172 2023-03-31T15:44:06Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{{{{|safesubst:}}}#Invoke:String|replace|{{{1|{{{{{|safesubst:}}}PAGENAME}}}}}|%s+%b()$||1|false}}<noinclude> {{documentation}} </noinclude> f23a5d434cb5b0baac5e1f58e9ceef9118e6873f Template:Ambox globe 10 202 567 566 2023-03-31T15:44:06Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#switch:{{#expr: floor(({{#time:G}} + 2) / 8) mod 3 }} |0={{{asia-australia|Ambox globe Asia Australia.svg}}} |1={{{europe-africa|Ambox globe.svg}}} |2={{{americas|Ambox globe Americas.svg}}} }}<noinclude> {{Documentation}} </noinclude> 16453b457ebfd4a4a17bc9b6f6c37195ede3dbe9 Template:Ambox globe current red 10 203 569 568 2023-03-31T15:44:06Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{Ambox globe |europe-africa = Ambox current red.svg |americas = Ambox current red Americas.svg |asia-australia = Ambox current red Asia Australia.svg }}<noinclude> {{Documentation}} </noinclude> 91fc691cd9ed82a9d6c951ba6b2e2575326b3270 Template:SUBJECTSPACE formatted 10 204 571 570 2023-03-31T15:44:07Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#switch: {{SUBJECTSPACE}} | {{ns:0}} = article | {{ns:4}} = Wikipedia page | {{ns:2}} | {{ns:12}} = {{lc:{{SUBJECTSPACE}}}} page | #default = {{lc:{{SUBJECTSPACE}}}} }}<noinclude> {{Documentation}} </noinclude> 4f84e8059ec30e2a96684cbcd53b80e19ff9f1e5 Template:Update 10 205 573 572 2023-03-31T15:44:08Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{ {{{|safesubst:}}}#invoke:Unsubst||date=__DATE__ |$B= {{main other | demospace = {{{demospace|}}} |{{ambox | name = Update | subst = <includeonly>{{subst:substcheck}}</includeonly> | type = content | class = ambox-Update | image = [[File:{{Ambox globe current red}}|42px|link=|alt=]] | issue = {{#if:{{{part|{{{1|}}}}}} |{{#ifeq:{{{part|{{{1|}}}}}}|section |{{#if:{{{inaccurate|}}} |This section's '''[[Wikipedia:Accuracy dispute|factual accuracy]] may be compromised due to out-of-date information''' |This section needs to be '''updated'''}} |{{#if:{{{inaccurate|}}} |The '''[[Wikipedia:Accuracy dispute|factual accuracy]]''' of parts of this article (those related to {{{part|{{{1|}}}}}}) '''may be compromised due to out-of-date information''' |Parts of this article (those related to {{{part|{{{1|}}}}}}) need to be '''updated'''}} }} |{{#if:{{{inaccurate|}}} |This article's '''[[Wikipedia:Accuracy dispute|factual accuracy]] may be compromised due to out-of-date information''' |This article needs to be '''updated'''}} }}. {{#if:{{{reason|}}}|The reason given is: {{{reason}}}.}} | fix = Please help update this {{{type|{{SUBJECTSPACE formatted}}}}} to reflect recent events or newly available information. {{#if:{{{2|{{{updated|}}}}}} |<br /><small>Last update: {{{2|{{{updated}}}}}}</small> }} | talk = {{{talk|{{{talksection|{{{discuss|}}}}}}}}} | date = {{{date|}}} | cat = {{#if:{{{inaccurate|}}}|Articles with obsolete information|Wikipedia articles in need of updating}} | all = All Wikipedia articles in need of updating | all2 = {{{cat|}}} }} |{{mbox | name = Update | subst = <includeonly>{{subst:substcheck}}</includeonly> | type = content | class = ambox-Update | image = [[File:{{Ambox globe current red}}|42px|link=|alt=]] | text = {{#if:{{{part|{{{1|}}}}}} |{{#if:{{{inaccurate|}}} |The '''[[Wikipedia:Accuracy dispute|factual accuracy]]''' of parts of this {{{type|{{SUBJECTSPACE formatted}}}}} (those related to {{{part|{{{1|}}}}}}) '''may be compromised due to out-of-date information''' |Parts of this {{{type|{{SUBJECTSPACE formatted}}}}} (those related to {{{part|{{{1|}}}}}}) need to be '''updated'''}} |{{#if:{{{inaccurate|}}} |The '''[[Wikipedia:Accuracy dispute|factual accuracy]]''' of this {{{type|{{SUBJECTSPACE formatted}}}}} '''may be compromised due to out-of-date information''' |This {{{type|{{SUBJECTSPACE formatted}}}}} needs to be '''updated'''}} }}. {{#if:{{{reason|}}}|The reason given is: {{{reason}}}.}} Please help update this {{{type|{{SUBJECTSPACE formatted}}}}} to reflect recent events or newly available information. {{#ifexist: {{TALKPAGENAME}} |Relevant discussion may be found on {{#if: {{{talk|{{{talksection|{{{discuss|}}}}}}}}} | [[{{TALKPAGENAME}}#{{{talk|{{{talksection|{{{discuss}}}}}}}}}|the talk page]] | [[{{TALKPAGENAME}}| the talk page]] }}.}} {{#if:{{{date|}}}|<small>''({{{date}}})''</small>}} {{#if:{{{2|{{{updated|}}}}}} |<br /><small>Last update: {{{2|{{{updated}}}}}}</small> }} }} }} }}<noinclude> <!-- Place categories on /doc subpage; interwikis go to Wikidata. --> {{Documentation}} </noinclude> 7dca1948836f52c31882d2bf59eb29dc012f5aac Module:Italic title 828 206 575 574 2023-03-31T15:44:08Z 17ademoladav 2 1 revision imported Scribunto text/plain -- This module implements {{italic title}}. require('strict') local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local yesno = require('Module:Yesno') -------------------------------------------------------------------------------- -- ItalicTitle class -------------------------------------------------------------------------------- local ItalicTitle = {} do ---------------------------------------------------------------------------- -- Class attributes and functions -- Things that belong to the class are here. Things that belong to each -- object are in the constructor. ---------------------------------------------------------------------------- -- Keys of title parts that can be italicized. local italicizableKeys = { namespace = true, title = true, dab = true, } ---------------------------------------------------------------------------- -- ItalicTitle constructor -- This contains all the dynamic attributes and methods. ---------------------------------------------------------------------------- function ItalicTitle.new() local obj = {} -- Function for checking self variable in methods. local checkSelf = libraryUtil.makeCheckSelfFunction( 'ItalicTitle', 'obj', obj, 'ItalicTitle object' ) -- Checks a key is present in a lookup table. -- Param: name - the function name. -- Param: argId - integer position of the key in the argument list. -- Param: key - the key. -- Param: lookupTable - the table to look the key up in. local function checkKey(name, argId, key, lookupTable) if not lookupTable[key] then error(string.format( "bad argument #%d to '%s' ('%s' is not a valid key)", argId, name, key ), 3) end end -- Set up object structure. local parsed = false local categories = {} local italicizedKeys = {} local italicizedSubstrings = {} -- Parses a title object into its namespace text, title, and -- disambiguation text. -- Param: options - a table of options with the following keys: -- title - the title object to parse -- ignoreDab - ignore any disambiguation parentheses -- Returns the current object. function obj:parseTitle(options) checkSelf(self, 'parseTitle') checkType('parseTitle', 1, options, 'table') checkTypeForNamedArg('parseTitle', 'title', options.title, 'table') local title = options.title -- Title and dab text local prefix, parentheses if not options.ignoreDab then prefix, parentheses = mw.ustring.match( title.text, '^(.+) %(([^%(%)]+)%)$' ) end if prefix and parentheses then self.title = prefix self.dab = parentheses else self.title = title.text end -- Namespace local namespace = mw.site.namespaces[title.namespace].name if namespace and #namespace >= 1 then self.namespace = namespace end -- Register the object as having parsed a title. parsed = true return self end -- Italicizes part of the title. -- Param: key - the key of the title part to be italicized. Possible -- keys are contained in the italicizableKeys table. -- Returns the current object. function obj:italicize(key) checkSelf(self, 'italicize') checkType('italicize', 1, key, 'string') checkKey('italicize', 1, key, italicizableKeys) italicizedKeys[key] = true return self end -- Un-italicizes part of the title. -- Param: key - the key of the title part to be un-italicized. Possible -- keys are contained in the italicizableKeys table. -- Returns the current object. function obj:unitalicize(key) checkSelf(self, 'unitalicize') checkType('unitalicize', 1, key, 'string') checkKey('unitalicize', 1, key, italicizableKeys) italicizedKeys[key] = nil return self end -- Italicizes a substring in the title. This only affects the main part -- of the title, not the namespace or the disambiguation text. -- Param: s - the substring to be italicized. -- Returns the current object. function obj:italicizeSubstring(s) checkSelf(self, 'italicizeSubstring') checkType('italicizeSubstring', 1, s, 'string') italicizedSubstrings[s] = true return self end -- Un-italicizes a substring in the title. This only affects the main -- part of the title, not the namespace or the disambiguation text. -- Param: s - the substring to be un-italicized. -- Returns the current object. function obj:unitalicizeSubstring(s) checkSelf(self, 'unitalicizeSubstring') checkType('unitalicizeSubstring', 1, s, 'string') italicizedSubstrings[s] = nil return self end -- Renders the object into a page name. If no title has yet been parsed, -- the current title is used. -- Returns string function obj:renderTitle() checkSelf(self, 'renderTitle') -- Italicizes a string -- Param: s - the string to italicize -- Returns string. local function italicize(s) assert(type(s) == 'string', 's was not a string') assert(s ~= '', 's was the empty string') return string.format('<i>%s</i>', s) end -- Escape characters in a string that are magic in Lua patterns. -- Param: pattern - the pattern to escape -- Returns string. local function escapeMagicCharacters(s) assert(type(s) == 'string', 's was not a string') return s:gsub('%p', '%%%0') end -- If a title hasn't been parsed yet, parse the current title. if not parsed then self:parseTitle{title = mw.title.getCurrentTitle()} end -- Italicize the different parts of the title and store them in a -- titleParts table to be joined together later. local titleParts = {} -- Italicize the italicizable keys. for key in pairs(italicizableKeys) do if self[key] then if italicizedKeys[key] then titleParts[key] = italicize(self[key]) else titleParts[key] = self[key] end end end -- Italicize substrings. If there are any substrings to be -- italicized then start from the raw title, as this overrides any -- italicization of the main part of the title. if next(italicizedSubstrings) then titleParts.title = self.title for s in pairs(italicizedSubstrings) do local pattern = escapeMagicCharacters(s) local italicizedTitle, nReplacements = titleParts.title:gsub( pattern, italicize ) titleParts.title = italicizedTitle -- If we didn't make any replacements then it means that we -- have been passed a bad substring or that the page has -- been moved to a bad title, so add a tracking category. if nReplacements < 1 then categories['Pages using italic title with no matching string'] = true end end end -- Assemble the title together from the parts. local ret = '' if titleParts.namespace then ret = ret .. titleParts.namespace .. ':' end ret = ret .. titleParts.title if titleParts.dab then ret = ret .. ' (' .. titleParts.dab .. ')' end return ret end -- Returns an expanded DISPLAYTITLE parser function called with the -- result of obj:renderTitle, plus any other optional arguments. -- Returns string function obj:renderDisplayTitle(...) checkSelf(self, 'renderDisplayTitle') return mw.getCurrentFrame():callParserFunction( 'DISPLAYTITLE', self:renderTitle(), ... ) end -- Returns an expanded DISPLAYTITLE parser function called with the -- result of obj:renderTitle, plus any other optional arguments, plus -- any tracking categories. -- Returns string function obj:render(...) checkSelf(self, 'render') local ret = self:renderDisplayTitle(...) for cat in pairs(categories) do ret = ret .. string.format( '[[Category:%s]]', cat ) end return ret end return obj end end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} local function getArgs(frame, wrapper) assert(type(wrapper) == 'string', 'wrapper was not a string') return require('Module:Arguments').getArgs(frame, { wrappers = wrapper }) end -- Main function for {{italic title}} function p._main(args) checkType('_main', 1, args, 'table') local italicTitle = ItalicTitle.new() italicTitle:parseTitle{ title = mw.title.getCurrentTitle(), ignoreDab = yesno(args.all, false) } if args.string then italicTitle:italicizeSubstring(args.string) else italicTitle:italicize('title') end return italicTitle:render(args[1]) end function p.main(frame) return p._main(getArgs(frame, 'Template:Italic title')) end function p._dabonly(args) return ItalicTitle.new() :italicize('dab') :render(args[1]) end function p.dabonly(frame) return p._dabonly(getArgs(frame, 'Template:Italic dab')) end return p 9b49016c8f526f680e9ecdaf36ec4ceafda2a2f8 Template:Hidden begin 10 13 577 576 2023-03-31T15:44:09Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly><templatestyles src="Template:Hidden begin/styles.css"/><div class="hidden-begin mw-collapsible {{#ifeq:{{{showhide|{{{toggle}}}}}}|left|mw-collapsible-leftside-toggle}} {{#if:{{{expanded|}}}||mw-collapsed}} {{{class|}}}" style="{{#if:{{{width|}}}|width:{{{width}}};}} {{#if:{{{border|}}}|border:{{{border}}};}} {{#if:{{{bgcolor|}}}|background-color:{{{bgcolor}}};}} {{{style|}}}"><!-- --><div class="hidden-title" style="{{#if:{{{ta1|}}}|text-align:{{{ta1}}};}} {{#if:{{{titlebgcolor|}}}|background-color:{{{titlebgcolor}}};}} {{{titlestyle|}}}">{{{title|{{{header|}}}}}}</div><!-- --><div class="hidden-content mw-collapsible-content" style="{{#if:{{{ta2|}}}|text-align:{{{ta2}}};}} {{#if:{{{contentbgcolor|}}}|background-color:{{{contentbgcolor}}};}} {{{contentstyle|{{{bodystyle|}}}}}}"><!-- Content added after the template --></includeonly><noinclude> {{Documentation}} </noinclude> be0f4e092203b931810fbff9ed6a1b7af51c025f Template:Hidden end 10 14 579 578 2023-03-31T15:44:09Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly></div></div></includeonly><noinclude> {{hatnote|Templates {{noredirect|Template:End hidden|End hidden}} and {{noredirect|Template:End hidden section|End hidden section}} redirect here.}} {{Documentation|Template:Hidden begin/doc}} </noinclude> 6cc7eb4776ef10092d5f7d48da123117e7b430b2 Template:Notice 10 207 581 580 2023-03-31T15:44:10Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{Mbox | name = Notice | demospace = {{{demospace|}}} | style = {{#if:{{{style|}}} |{{{style}}} }} | subst = <includeonly>{{subst:substcheck}}</includeonly> | type = notice | image = {{#if:{{{image|}}} |[[File:{{{image}}}|40px|Notice|alt={{{imagealt|}}}]]}} | small = {{{small|}}} | smallimage = {{#if:{{{image|}}} |[[File:{{{image}}}|30px|Notice|alt={{{imagealt|}}}]]}} | imageright = {{#if:{{{imageright|}}} |{{{imageright}}} |{{#if:{{{shortcut|{{{shortcut1|}}}}}} |{{Ombox/shortcut|{{{shortcut|{{{shortcut1|}}}}}}|{{{shortcut2|}}}|{{{shortcut3|}}}|{{{shortcut4|}}}|{{{shortcut5|}}}}}}} }} | textstyle = {{{textstyle|text-align: {{#if:{{{center|}}}|center|{{{align|left}}}}};}}} | text = {{#if:{{{header|{{{heading|{{{title|}}}}}}}}} |<div style="{{{headstyle|text-align: {{#if:{{{center|}}}|center|left}};}}}">'''{{{header|{{{heading|{{{title|}}}}}}}}}'''</div>}}<!-- -->{{{text|{{{content|{{{reason|{{{1}}}}}}}}}}}} }}<noinclude> {{Documentation}} </noinclude> 2cbdbb721ca517005f6827650eef5b0f17537a43 Template:ECLI 10 208 583 582 2023-03-31T15:44:10Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly>{{#switch: {{#invoke:String|sub|{{{ECLI|{{{1}}}}}}|6|7}} |NL = {{#switch: {{{db|}}} |NL_TUCHTRECHT = [https://tuchtrecht.overheid.nl/zoeken/resultaat/uitspraak/{{#invoke:String|replace|{{{ECLI|{{{1}}}}}}|:|_}} {{{ECLI|{{{1}}}}}}] |NL_RECHTSPRAAK |#default = [https://deeplink.rechtspraak.nl/uitspraak?id={{{ECLI|{{{1}}}}}} {{{ECLI|{{{1}}}}}}] }} |AT = [https://www.ris.bka.gv.at/Ergebnis.wxe?Suchworte={{{ECLI|{{{1}}}}}}&Abfrage=Gesamtabfrage {{{ECLI|{{{1}}}}}}] |BE = [https://juportal.be/content/{{{ECLI|{{{1}}}}}} {{{ECLI|{{{1}}}}}}] |CE = [https://hudoc.echr.coe.int/eng#%7B%22ecli%22:%5B%22{{{ECLI|{{{1}}}}}}%22%5D%7D {{{ECLI|{{{1}}}}}}] |EU = [https://eur-lex.europa.eu/legal-content/EN/ALL/?uri=ecli:{{{ECLI|{{{1}}}}}} {{{ECLI|{{{1}}}}}}] |CZ |DE |EP |ES |FI |FR |SI = [https://e-justice.europa.eu/ecli/{{{ECLI|{{{1}}}}}} {{{ECLI|{{{1}}}}}}] |SK = [https://otvorenesudy.sk/decrees?l=en&q={{{ECLI|{{{1}}}}}} {{{ECLI|{{{1}}}}}}] |#default = {{{ECLI|{{{1}}}}}} }}</includeonly><noinclude>{{Documentation}}</noinclude> 36d073663124b4dd9781e8044b15fadc3d7b052d Template:Infobox court case/images 10 209 585 584 2023-03-31T15:44:11Z 17ademoladav 2 1 revision imported wikitext text/x-wiki <includeonly>{{#switch:{{{courtimage|}}} <!--AUSTRALIA--> |[[High Court of Australia]] = Coat of Arms of Australia.svg |[[Federal Court of Australia]] = Coat of Arms of Australia.svg |[[Supreme Court of the Australian Capital Territory|Court of Appeal of the Australian Capital Territory]] |[[Supreme Court of the Australian Capital Territory]] = Coat of Arms of Canberra.svg |[[New South Wales Court of Appeal]] |[[New South Wales Court of Appeal|Court of Appeal of New South Wales]] |[[Supreme Court of New South Wales]] = New South Wales coa.png |[[Supreme Court of the Northern Territory|Court of Appeal of the Northern Territory]] = <!-- None --> |[[Supreme Court of the Northern Territory]] = Coat of arms of Northern Territory.png |[[Supreme Court of Queensland|Court of Appeal of Queensland]] |[[Supreme Court of Queensland]] = Coat of Arms of Queensland.svg |[[Supreme Court of South Australia]] = Supreme Court of South Australia.jpg |[[Supreme Court of Tasmania|Court of Appeal of Tasmania]] |[[Supreme Court of Tasmania]] = Tasmania Coat of Arms.svg |[[Supreme Court of Victoria|Court of Appeal of Victoria]] |[[Supreme Court of Victoria]] = Supreme Court of Victoria.jpg |[[Supreme Court of Western Australia|Court of Appeal of Western Australia]] |[[Supreme Court of Western Australia]] = Western Australian Coat of Arms.svg <!--CANADA--> |[[Supreme Court of Canada]] = Supreme Court of Canada 2.jpg |[[Federal Court of Appeal (Canada)|Federal Court of Appeal of Canada]] |[[Federal Court (Canada)|Federal Court of Canada]] = <!-- None --> |[[Alberta Court of Appeal]] = Shield of Alberta.svg |[[British Columbia Court of Appeal]] = Coat of Arms of British Columbia.png |[[Manitoba Court of Appeal]] = <!-- None --> |[[Court of Appeal of New Brunswick]] |[[Court of Appeal of New Brunswick|New Brunswick Court of Appeal]] |[[New Brunswick Court of Appeal]] = Arms of New Brunswick.svg |[[Court of Appeal of Newfoundland]] |[[Newfoundland Court of Appeal]] |[[Supreme Court of Newfoundland (Court of Appeal)|Court of Appeal of Newfoundland]] |[[Supreme Court of Newfoundland (Court of Appeal)|Newfoundland Court of Appeal]] = Arms of Newfoundland and Labrador.svg |[[Court of Appeal for the Northwest Territories]] = Coat of arms of Northwest Territories.svg |[[Nova Scotia Court of Appeal]] = Coat of arms of Nova Scotia.svg |[[Nunavut Court of Justice]] = Coat of arms of Nunavut.svg |[[Court of Appeal for Ontario]] |[[Ontario Court of Appeal]] = Osgoode Hall May 2012.jpg |[[Supreme Court of Prince Edward Island|Supreme Court of Prince Edward Island (Appeal Division)]] = Flag of Prince Edward Island.svg |[[Quebec Court of Appeal]] = Coat of arms of Quebec.svg |[[Court of Appeal for Saskatchewan]] |[[Saskatchewan Court of Appeal]] = Regina Courthouse.jpg |[[Court of Appeal of the Yukon Territory]] |[[Yukon Territory Court of Appeal]] = Coat of arms of Yukon.svg <!--INDIA--> |[[Supreme Court of India]] = Emblem of the Supreme Court of India.svg |[[Allahabad High Court]] |[[Andhra Pradesh High Court]] |[[Bombay High Court]] |[[Calcutta High Court]] |[[Chhattisgarh High Court]] |[[Delhi High Court]] |[[Guwahati High Court]] |[[Gujarat High Court]] |[[Himachal Pradesh High Court]] |[[Jammu and Kashmir High Court]] |[[Jharkhand High Court]] |[[Karnataka High Court]] |[[Kerala High Court]] |[[Madhya Pradesh High Court]] |[[Madras High Court]] |[[Orissa High Court]] |[[Patna High Court]] |[[Punjab and Haryana High Court]] |[[Rajasthan High Court]] |[[Sikkim High Court]] |[[Uttarakhand High Court]] = Emblem of India.svg <!--INTERNATIONAL COURTS AND TRIBUNALS--> |[[International Court of Justice]] = International Court of Justice Seal.svg <!--IRELAND--> |[[Supreme Court of Ireland]] |[[Court of Criminal Appeal (Ireland)|Court of Criminal Appeal of Ireland]] |[[High Court (Ireland)|High Court of Ireland]] = Coat of arms of Ireland.svg <!--MALAYSIA--> |[[Federal Court of Malaysia]] |[[Court of Appeal of Malaysia]] = Palace of Justice Putrajaya Dec 2006 002.jpg |[[High Courts of Malaysia|High Court in Malaya]] = KualaLumpurCourtsComplex-Malaysia-20080509-cropped.jpg |[[High Courts of Malaysia|High Court in Sabah and Sarawak]] = <!-- None --> <!--NEW ZEALAND--> |[[Supreme Court of New Zealand]] |[[Court of Appeal of New Zealand]] |[[High Court of New Zealand]] = Coat of arms of New Zealand.svg <!--PAKISTAN--> |[[Supreme Court of Pakistan]] = Emblem of the Supreme Court of Pakistan.svg <!--PHILIPPINES--> |[[Supreme Court of the Philippines]] = Seal of the Supreme Court of the Republic of the Philippines.svg <!--SINGAPORE--> |[[Court of Appeal of Singapore]] |[[High Court of Singapore]] = {{#ifexpr:{{gsd|day={{#time:j|{{{date|}}}}}|month={{#time:n|{{{date|}}}}}|year={{#time:Y|{{{date|}}}}} }}<732117|OldSupremeCourtBuilding-Singapore-20070409.jpg|SupremeCourtBuilding-Singapore-20070210.jpg}} <!--SOUTH AFRICA--> |[[Constitutional Court of South Africa]] = Constitutional court of South Africa.jpeg |[[Transvaal Provincial Division]] |[[North Gauteng High Court]] |[[Gauteng Division]] |[[Gauteng Division]] (Pretoria) = Palace of Justice, Church Square, pretoria.JPG |[[Witwatersrand Local Division]] |[[South Gauteng High Court]] |[[Gauteng Division]] (Johannesburg) = Jo'burg High Court.jpg |[[Cape Provincial Division]] |[[Western Cape High Court]] |[[Western Cape Division]] = Western Cape High Court.jpg <!--UNITED KINGDOM--> |[[Supreme Court of the United Kingdom]] = Badge of the Supreme Court of the United Kingdom.svg |[[Judicial Committee of the Privy Council]] |[[Judicial Committee of the Privy Council|Privy Council]] |[[Privy Council]] = Royal Arms of the United Kingdom (Privy Council).svg |[[House of Lords]] |[[Judicial functions of the House of Lords|House of Lords]] |[[Court of Appeal of England and Wales]] |[[High Court of Justice]] |[[High Court of Justice#Queen's Bench Division|High Court of Justice (Queen's Bench Division)]] |[[Divisional Court (England and Wales)|Divisional Court]] |[[King's Bench]] |[[King's Bench Division]] |[[Queen's Bench]] |[[Queen's Bench Division]] |[[High Court of Justice#Chancery Division|High Court of Justice (Chancery Division)]] |[[Chancery Division]] |[[High Court of Justice#Family Division|High Court of Justice (Family Division)]] |[[Family Division]] |[[Court for Crown Cases Reserved]] |[[Court of Common Pleas (England)|Court of Common Pleas]] |[[Court of Criminal Appeal]] |[[Court of Exchequer Chamber]] = Royal Coat of Arms of the United Kingdom.svg |[[High Court of Justiciary]] = Royal Coat of Arms of the United Kingdom (Scotland).svg <!--USA--> |[[Supreme Court of the United States]] = Seal of the United States Supreme Court.svg |[[United States Court of Appeals for the Federal Circuit]] = US-CourtOfAppeals-FederalCircuit-Seal.svg |[[United States Court of Appeals for the District of Columbia Circuit]] = District of Columbia Court of Appeals Seal.svg |[[United States Court of Appeals for the First Circuit]] = Seal of the United States Court of Appeals for the First Circuit.svg |[[United States Court of Appeals for the Second Circuit]] = United States Court of Appeals For The Second Circuit Seal.svg |[[United States Court of Appeals for the Third Circuit]] = Seal of the United States Court of Appeals for the Third Circuit.svg |[[United States Court of Appeals for the Fourth Circuit]] = Seal of the United States Court of Appeals for the Fourth Circuit.svg |[[United States Court of Appeals for the Fifth Circuit]] = Seal of the United States Court of Appeals for the Fifth Circuit.svg |[[United States Court of Appeals for the Sixth Circuit]] = US-CourtOfAppeals-6thCircuit-Seal.png |[[United States Court of Appeals for the Seventh Circuit]] = Seal of the United States Court of Appeals for the Seventh Circuit.svg |[[United States Court of Appeals for the Eighth Circuit]] = US-CourtOfAppeals-8thCircuit-Seal.png |[[United States Court of Appeals for the Ninth Circuit]] = Seal of the United States Court of Appeals, 9th Circuit.svg |[[United States Court of Appeals for the Tenth Circuit]] = US-CourtOfAppeals-10thCircuit-Seal.png |[[United States Court of Appeals for the Eleventh Circuit]] = US-CourtOfAppeals-11thCircuit-Seal.png |[[United States Court of Appeals for Veterans Claims]] = Seal of the United States Court of Appeals for Veterans Claims.svg |[[United States Court of Federal Claims]] = Seal of the United States Court of Federal Claims.svg |[[Supreme Court of California]] = Seal of the Supreme Court of California.png |[[California Courts of Appeal]] = Supremecourtofcaliforniamaincourthouse.jpg |[[Massachusetts Supreme Judicial Court]] = Seal of Massachusetts.svg |[[New York Court of Appeals]] = Seal of the New York Court of Appeals.svg |[[Supreme Court of Texas]] = Seal of the Supreme Court of Texas.png |[[Supreme Court of Virginia]] = Seal of Virginia.svg <!--U.S. District Courts--> |[[United States District Court for the Northern District of Alabama]] = NDAla seal.gif |[[United States District Court for the Middle District of Alabama]] = Seal_of_the_United_States_District_Court_for_the_Middle_District_of_Alabama.gif |[[United States District Court for the Southern District of Alabama]] = Alabama-southern.gif |[[United States District Court for the District of Alaska]] = District-Alaska.gif |[[United States District Court for the District of Arizona]] = District of Arizona District Court.png |[[United States District Court for the Eastern District of Arkansas]] = Arkansas-eastern.gif |[[United States District Court for the Western District of Arkansas]] = <!-- None --> |[[United States District Court for the Central District of California]] = <!-- None --> |[[United States District Court for the Eastern District of California]] = California-eastern.gif |[[United States District Court for the Northern District of California]] = US DC NorCal.svg |[[United States District Court for the Southern District of California]] = Seal of the United States District Court for the Southern District of California.png |[[United States District Court for the District of Colorado]] = <!-- None --> |[[United States District Court for the District of Connecticut]] = <!-- None --> |[[United States District Court for the District of Delaware]] = Delaware District Court.gif |[[United States District Court for the District of Columbia]] = Seal of the U.S. District Court for the District of Columbia.png |[[United States District Court for the Northern District of Florida]] = <!-- None --> |[[United States District Court for the Middle District of Florida]] = <!-- None --> |[[United States District Court for the Southern District of Florida]] = <!-- None --> |[[United States District Court for the Northern District of Georgia]] = <!-- None --> |[[United States District Court for the Middle District of Georgia]] = <!-- None --> |[[United States District Court for the Southern District of Georgia]] = <!-- None --> |[[United States District Court for the District of Guam]] = <!-- None --> |[[United States District Court for the District of Hawaii]] = <!-- None --> |[[United States District Court for the District of Idaho]] = District-Idaho.gif |[[United States District Court for the Northern District of Illinois]] = N.D. Ill. seal.gif |[[United States District Court for the Central District of Illinois]] = <!-- None --> |[[United States District Court for the Southern District of Illinois]] = <!-- None --> |[[United States District Court for the Northern District of Indiana]] = <!-- None --> |[[United States District Court for the Southern District of Indiana]] = <!-- None --> |[[United States District Court for the Northern District of Iowa]] = <!-- None --> |[[United States District Court for the Southern District of Iowa]] = <!-- None --> |[[United States District Court for the District of Kansas]] = <!-- None --> |[[United States District Court for the Eastern District of Kentucky]] = EDKY seal.gif |[[United States District Court for the Western District of Kentucky]] = <!-- None --> |[[United States District Court for the Eastern District of Louisiana]] = Louisiana-eastern.gif |[[United States District Court for the Middle District of Louisiana]] = Louisiana-middle.gif |[[United States District Court for the Western District of Louisiana]] = Louisiana-western.gif |[[United States District Court for the District of Maine]] = <!-- None --> |[[United States District Court for the District of Maryland]] = <!-- None --> |[[United States District Court for the District of Massachusetts]] = District-Massachusetts.gif |[[United States District Court for the Eastern District of Michigan]] = <!-- None --> |[[United States District Court for the Western District of Michigan]] = <!-- None --> |[[United States District Court for the District of Minnesota]] = <!-- None --> |[[United States District Court for the Northern District of Mississippi]] = <!-- None --> |[[United States District Court for the Southern District of Mississippi]] = <!-- None --> |[[United States District Court for the Eastern District of Missouri]] = <!-- None --> |[[United States District Court for the Western District of Missouri]] = <!-- None --> |[[United States District Court for the District of Montana]] = <!-- None --> |[[United States District Court for the District of Nebraska]] = <!-- None --> |[[United States District Court for the District of Nevada]] = <!-- None --> |[[United States District Court for the District of New Hampshire]] = USDCNHseal.gif |[[United States District Court for the District of New Jersey]] = <!-- None --> |[[United States District Court for the District of New Mexico]] = <!-- None --> |[[United States District Court for the Eastern District of New York]] = NewYork-eastern.gif |[[United States District Court for the Northern District of New York]] = NewYork-northern.gif |[[United States District Court for the Southern District of New York]] = NewYork-southern.gif |[[United States District Court for the Western District of New York]] = <!-- None --> |[[United States District Court for the Eastern District of North Carolina]] = <!-- None --> |[[United States District Court for the Middle District of North Carolina]] = NorthCarolina-middle.gif |[[United States District Court for the Western District of North Carolina]] = NorthCarolina-western.gif |[[United States District Court for the District of North Dakota]] = <!-- None --> |[[United States District Court for the Northern Mariana Islands]] = District-NorthernMarianaIslands.gif |[[United States District Court for the Northern District of Ohio]] = Ohio-northern.gif |[[United States District Court for the Southern District of Ohio]] = Ohio-southern.gif |[[United States District Court for the Eastern District of Oklahoma]] = <!-- None --> |[[United States District Court for the Northern District of Oklahoma]] = Oklahoma-northern.gif |[[United States District Court for the Western District of Oklahoma]] = Oklahoma-western.gif |[[United States District Court for the District of Oregon]] = District-Oregon.gif |[[United States District Court for the Eastern District of Pennsylvania]] = Pennsylvania-eastern.gif |[[United States District Court for the Middle District of Pennsylvania]] = Pennsylvania-middle.gif |[[United States District Court for the Western District of Pennsylvania]] = Pennsylvania-western.gif |[[United States District Court for the District of Puerto Rico]] = District-PuertoRico.gif |[[United States District Court for the District of Rhode Island]] = Seal of the U.S. District Court for the District of Rhode Island.jpg |[[United States District Court for the District of South Carolina]] = District-SouthCarolinaA.gif |[[United States District Court for the District of South Dakota]] = District-SouthDakota.gif |[[United States District Court for the Eastern District of Tennessee]] = Tennessee-eastern.gif |[[United States District Court for the Middle District of Tennessee]] = Tennessee-middle.gif |[[United States District Court for the Western District of Tennessee]] = Tennessee-western.gif |[[United States District Court for the Eastern District of Texas]] = Texas-eastern.gif |[[United States District Court for the Northern District of Texas]] = Texas-northern.gif |[[United States District Court for the Southern District of Texas]] = Texas-southern.gif |[[United States District Court for the Western District of Texas]] = Texas-western.gif |[[United States District Court for the District of Utah]] = District-Utah.gif |[[United States District Court for the District of Vermont]] = District-Vermont.gif |[[District Court of the Virgin Islands]] = District-VirginIslands.gif |[[United States District Court for the Eastern District of Virginia]] = Virginia-eastern.gif |[[United States District Court for the Western District of Virginia]] = Virginia-western.gif |[[United States District Court for the Eastern District of Washington]] = Washington-eastern.gif |[[United States District Court for the Western District of Washington]] = Washington-western.gif |[[United States District Court for the Northern District of West Virginia]] = WestVirginia-northern.gif |[[United States District Court for the Southern District of West Virginia]] = WestVirginia-southern.gif |[[United States District Court for the Eastern District of Wisconsin]] = Wisconsin-eastern.png |[[United States District Court for the Western District of Wisconsin]] = <!-- None --> |[[United States District Court for the District of Wyoming]] = District-Wyoming.gif <!--DEFAULT--> |#default = <!-- None --> }}</includeonly><noinclude>{{Documentation}}</noinclude> 7d1f296c3d571cb548bcac4c2b0c329bd665cfb6 Template:Auto italic title 10 210 587 586 2023-03-31T15:44:12Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{ombox | type = notice | text = This {{{2|infobox}}} should [[Wikipedia:Article titles#Italics and other formatting|italicize the article title]] automatically. If this is not required, add {{para|{{#if:{{{1|}}}|{{{1}}}|italic title}}|{{#if:{{{3|}}}|{{{3}}}|no}}}} to the list of parameters. {{#if: {{{short|}}} | | If this is required but the title is not being italicized, try {{para|{{#if:{{{1|}}}|{{{1}}}|italic title}}|force}}.}} }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> 6dc78a3d3de470bea8dc684b3278f5806fe0f5c3 Template:When on basepage 10 211 589 588 2023-03-31T15:44:13Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{#switch: <!--If no or empty "page" parameter then detect basepage/subpage/subsubpage--> {{#if:{{{page|}}} | {{#if:{{#titleparts:{{{page}}}|0|3}} | subsubpage <!--Subsubpage or lower--> | {{#if:{{#titleparts:{{{page}}}|0|2}} | subpage | basepage }} }} | {{#if:{{#titleparts:{{FULLPAGENAME}}|0|3}} | subsubpage <!--Subsubpage or lower--> | {{#if:{{#titleparts:{{FULLPAGENAME}}|0|2}} | subpage | basepage }} }} }} | basepage = {{{1|}}} | subpage = {{{2|}}} | subsubpage = {{{3| {{{2|}}} }}} <!--Respecting empty parameter on purpose--> }}<!--End switch--><noinclude> {{Documentation}} </noinclude> cf4dc92df647a26ab0ce149772a1fe3ac6c3dfc0 Template:Basepage subpage 10 212 591 590 2023-03-31T15:44:14Z 17ademoladav 2 1 revision imported wikitext text/x-wiki #REDIRECT [[Template:When on basepage]] {{Redirect category shell| {{R from move}} {{R from template shortcut}} }} 47118a1bed1942b7f143cdff1dec183002fc9f4b Template:Infobox court case/doc 10 213 593 592 2023-03-31T15:44:15Z 17ademoladav 2 1 revision imported wikitext text/x-wiki {{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{High-use}} {{Auto italic title}} {{Update|documentation}} {{Lua|Module:Infobox|Module:InfoboxImage|Module:Check for unknown parameters}} ==Usage== This template summarizes information about a specific court case. {{Infobox court case |name = |court = |image = |imagesize = |imagelink = |imagealt = |caption = |full name = |date decided = |citations = |ECLI = |transcripts = |judges = |number of judges = |decision by = |concurring = |dissenting = |concur/dissent = |prior actions = |appealed from = |appealed to = |subsequent actions = |related actions = |opinions = |keywords = <!-- {{Hlist|...}} --> |italic title = }} <pre> {{Infobox court case |name = |court = |image = |imagesize = |imagelink = |imagealt = |caption = |full name = |date decided = |citations = |ECLI = |transcripts = |judges = |number of judges = |decision by = |concurring = |dissenting = |concur/dissent = |prior actions = |appealed from = |appealed to = |subsequent actions = |related actions = |opinions = |keywords = <!-- {{Hlist|...}} --> |italic title = }} </pre> ==Parameters== This infobox takes a number of parameters, which are optional unless indicated otherwise: ;name :The short name of the case, which should preferably be the same as the article title. If the parameter is omitted, the article name is used. ;court :The name of the court that the case was heard in. <nowiki>[[Wikilink]]</nowiki> the name to a Wikipedia article about the court, if there is one. To cause the template to automatically display an image of the [[coat of arms]] of a court or of the court building, enter the name of the court as shown at {{tl|Infobox court case/images}}. ;image :An image to represent the court, such as a coat of arms or a photograph of a courthouse. Type the name of the image without the "{{mono|File:}}" prefix and do not [[Help:Link|wikilink]] it. If you omit this parameter, the template automatically displays an image according to the scheme at {{tl|Infobox court case/images}}. :Note that only images that have been released under a [[free content|free licence]] should be used here. Such images should preferably be uploaded to the [[:commons:Main Page|Wikimedia Commons]]. ''Do not'' use images under a (supposed) "[[Wikipedia:Non-free content|fair use]]" justification, as the use of such images in infoboxes probably does not constitute fair use. ;imagesize :The width of the image in [[pixel]]s, particularly if it is less than 180 [[pixel]]s (px). Type the number without the "px" suffix ("{{mono|150}}", not "{{mono|150px}}"). If this parameter is omitted or called but left blank, the image size defaults to 180px. ;imagelink :Page to [[WP:PIC#link|link]] to from the image. If this is specified, {{para|imagealt}} should also be specified. ;imagealt :Alt text for the image; see ''[[Wikipedia:Alternative text for images]]''. ;caption :A caption for the image. Terms in the caption can be wikilinked, if desired. ;full name :The full name of the case, including terms like "& Anor" ("and another") or "& Ors" ("and others"). Set out here any abbreviations that appear in the short name of the case in full. ;start date :The date the trial started. Use {{tlx|start date|yyyy|mm|dd}}. ;date decided :The date the decision was handed down. Use {{tlx|start date|yyyy|mm|dd}}. In line with "[[Wikipedia:Manual of Style (dates and numbers)#Linking and autoformatting of dates]]", do not add wikilinks to dates. ;citations :Citations of [[law report|reports]] of the case. If a report is available online, use a [[:Category:Law citation templates|citation template]] (such as {{tl|Cite BAILII}}) where available to generate an external link automatically, or else create a link manually. :Note that if the citation uses square brackets, replace them with {{mono|&amp;#91;}} and {{mono|&amp;#93;}} when putting them inside an external link. ;ECLI : The [[European Case Law Identifier]], eg. <code>ECLI:NL:RBAMS:1998:AD2957</code>, gives {{ECLI|ECLI:NL:RBAMS:1998:AD2957}} ;transcripts :External links to transcripts of the case, where available. ;judges :List the names of the judges sitting on the case, in the order of their precedence if known, separated by commas. The Chief Justice or President of the court, if they are hearing the case, should appear first. The order that the judges' names should appear in is usually shown in reports of the case. Where available, link a name to a Wikipedia article about the judge. ;number of judges :Write the number of judges in numerals. This parameter only controls whether the "judges" header is plural. If blank, it defaults to "judge(s)". ;decision by :Name the judge who wrote the decision if more than one judge sat on the case. Do not link a name again if it was already linked in the {{para|judges}} parameter. ;concurring :List those judges who wrote concurring opinions, if any. Do not link a name again if it was already linked in the {{para|judges}} parameter. ;dissenting :List those judges who wrote dissenting opinions, if any. Do not link a name again if it was already linked in the {{para|judges}} parameter. ;concur/dissent :List those judges, if any, who wrote opinions concurring in part and dissenting in part. Do not link a name again if it was already linked in the {{para|judges}} parameter. ;prior actions :Mention any prior trials or appeals, if any. Where possible, link the name of a prior case to a Wikipedia article about the case, and link citations as described above. ;appealed from :If this case is an appeal, name the court from which the appeal immediately came. Link the name if possible. If the case at the lower court has its own article, that case can be linked in parentheses after the name of the court. More complicated or longer histories can use the prior actions field alongside this field or instead of it. ;appealed to :If this case was appealed, name the court to which the appeal immediately went. Link the name if possible. If the case at the higher court has its own article, that case can be linked in parentheses after the name of the court. More complicated or longer histories can use the subsequent actions field alongside this field or instead of it. ;subsequent actions :Mention any later appeals, retrials, or prison sentences, if any. Where possible, link the name of a subsequent case to a Wikipedia article about the case, and link citations as described above. ;related actions :Mention any related actions, for example, ''[[Mabo v Queensland (No 2)]]'' if the article is about ''[[Mabo v Queensland (1988)|Mabo v Queensland (No 1)]]''. Where possible, link the name of a related case to a Wikipedia article about the case, and link citations as described above. ;opinions :A very brief summary of the major findings or holdings in the case. Many case reports will have headnotes or summaries of the holdings that can be modified and entered into this field. ;keywords :A list of [[index term|keywords]] that describe the legal issues dealt with by the case. List keywords alphabetically, separate them with {{tl|flatlist}} or {{tl|hlist}}, and link them to appropriate Wikipedia articles wherever possible; for example: <code><nowiki>{{hlist| [[Bailment]] | [[common carrier]] | [[negligence]] | [[strict liability]] }}</nowiki></code> :which will render as: {{hlist| [[Bailment]] | [[common carrier]] | [[negligence]] | [[strict liability]] }} ;italic title :Indicates that the page title should be italicized. Valid values are "yes", "no" or "force": :*{{para|italic title|yes}} – the title is italicised, but only if it is less than 50 characters in length; if it contains an opening parenthesis <code>(</code>, only the portion before the opening parenthesis will be italicised :*{{para|italic title|no}} – the title is not italicised :*{{para|italic title|force}} – the title is fully italicised :If the {{para|italic title}} parameter is blank or omitted, the action is identical to {{para|italic title|yes}} ; ECLI: The [[European Case Law Identifier]]. Available for EU courts, European Patent office (Board of Appeal), and several EU countries. Converted into a link to the judgement for Dutch, German and EU cases. ==Legacy parameters== Full blank syntax, including the legacy parameters included for compatibility with infoboxes based on [[Template:Infobox SCOTUS case]]. Those include: [[Template:Infobox California Supreme Court case]], [[Template:Infobox South Carolina Supreme Court case]]. {{hidden begin}} <pre> {{Infobox court case <!-- main parameters --> | name = {{{name|{{{Litigants|{{PAGENAME}} }}} }}} | court = {{{CourtName|{{{Court|{{{court}}} }}} }}} | image = {{{image|}}} | imagesize = {{{imagesize|}}} | imagelink = {{{imagelink|}}} | imagealt = {{{imagealt|}}} | caption = {{{caption|}}} | full name = {{{FullName|{{{full name|}}} }}} | start_date = {{{start_date|}}} | date_decided = {{{DecideDate|{{{date_decided|{{{date decided|}}} }}} }}} {{{DecideYear|}}} | citations = {{{Citation|{{{citations|{{{Citations|{{{CitationNew|}}} }}} }}} }}} | transcripts = {{{transcripts|}}} | judges = {{{judges|{{{Judges|{{{Membership|}}} }}} }}} | decision by = {{{decision by|}}} | concurring = {{{concurring|{{{Concurrence|}}} }}} | dissenting = {{{dissenting|{{{Dissent|}}} }}} | concur/dissent = {{{Concur/dissent|{{{Concurrence/Dissent|{{{concur/dissent|}}} }}} }}} | prior_actions = {{{prior_actions|{{{prior actions|{{{Prior|}}} }}} }}} | appealed from = {{{appealed from|}}} | appealed to = {{{appealed to|}}} | subsequent_actions = {{{subsequent_actions|{{{subsequent actions|{{{Subsequent|}}} }}} }}} | related actions = {{{related actions|{{{Related|}}} }}} | holding = {{{Outcome|{{{QuestionsPresented|{{{Holding|{{{holding|{{{Ruling|{{{opinions|}}} }}} }}} }}} }}} }}} | laws_applied = {{{LawsApplied|{{{laws_applied|}}} }}} | keywords = {{{Keywords|{{{keywords|}}} }}} | italic title = {{{italic title|}}} <!-- legacy parameters from Infobox SCOTUS case --> | CourtSeal = {{{CourtSeal|}}} | ArgueDate = {{{ArgueDate|}}} | ArgueDateA = {{{ArgueDateA|}}} | ArgueDateB = {{{ArgueDateB|}}} | ArgueDateC = {{{ArgueDateC|}}} | ArgueYear = {{{ArgueYear|}}} | ReargueDate = {{{ReargueDate|}}} | ReargueDateA = {{{ReargueDateA|}}} | ReargueDateB = {{{ReargueDateB|}}} | ReargueYear = {{{ReargueYear|}}} | ReargueDate2 = {{{ReargueDate2|}}} | ReargueDateA2 = {{{ReargueDateA2|}}} | ReargueDateB2 = {{{ReargueDateB2|}}} | ReargueYear2 = {{{ReargueYear2|}}} | SubmitDate = {{{SubmitDate|}}} | SubmitYear = {{{SubmitYear|}}} | Neutral Citation = {{{Neutral Citation|}}} | Other Citations = {{{Other Citations|}}} | Claim = {{{Claim|}}} | Cases_cited = {{{Cases_cited|}}} | Legislation_cited = {{{Legislation_cited|}}} | Procedural = {{{Procedural|}}} | OralArgument = {{{OralArgument|}}} | OralArguments = {{{OralArguments|}}} | OralReargument = {{{OralReargument|}}} | OpinionAnnouncement = {{{OpinionAnnouncement|}}} | ChiefJudge = {{{ChiefJudge|}}} | AssociateJudges = {{{AssociateJudges|}}} | PerCuriam = {{{PerCuriam|}}} | Majority = {{{Majority|}}} | JoinMajority = {{{JoinMajority|}}} | Majority2 = {{{Majority2|}}} | JoinMajority2 = {{{JoinMajority2|}}} | Majority3 = {{{Majority3|}}} | JoinMajority3 = {{{JoinMajority3|}}} | Plurality = {{{Plurality|}}} | JoinPlurality = {{{JoinPlurality|}}} | Plurality2 = {{{Plurality2|}}} | JoinPlurality2 = {{{JoinPlurality2|}}} | Plurality3 = {{{Plurality3|}}} | JoinPlurality3 = {{{JoinPlurality3|}}} | Plurality4 = {{{Plurality4|}}} | JoinPlurality4 = {{{JoinPlurality4|}}} | Seriatim = {{{Seriatim|}}} | Seriatim2 = {{{Seriatim2|}}} | Seriatim3 = {{{Seriatim3|}}} | Seriatim4 = {{{Seriatim4|}}} | Seriatim5 = {{{Seriatim5|}}} | JoinConcurrence = {{{JoinConcurrence|}}} | Concurrence2 = {{{Concurrence2|}}} | JoinConcurrence2 = {{{JoinConcurrence2|}}} | Concurrence3 = {{{Concurrence3|}}} | JoinConcurrence3 = {{{JoinConcurrence3|}}} | Concurrence4 = {{{Concurrence4|}}} | JoinConcurrence4 = {{{JoinConcurrence4|}}} | Concurrence5 = {{{Concurrence5|}}} | JoinConcurrence5 = {{{JoinConcurrence5|}}} | Concurrence6 = {{{Concurrence6|}}} | JoinConcurrence6 = {{{JoinConcurrence6|}}} | Concurrence7 = {{{Concurrence7|}}} | JoinConcurrence7 = {{{JoinConcurrence7|}}} | Concurrence8 = {{{Concurrence8|}}} | JoinConcurrence8 = {{{JoinConcurrence8|}}} | JoinConcurrence/Dissent = {{{JoinConcurrence/Dissent|}}} | Concurrence/Dissent2 = {{{Concurrence/Dissent2|}}} | JoinConcurrence/Dissent2 = {{{JoinConcurrence/Dissent2|}}} | Concurrence/Dissent3 = {{{Concurrence/Dissent3|}}} | JoinConcurrence/Dissent3 = {{{JoinConcurrence/Dissent3|}}} | Concurrence/Dissent4 = {{{Concurrence/Dissent4|}}} | JoinConcurrence/Dissent4 = {{{JoinConcurrence/Dissent4|}}} | Concurrence/Dissent5 = {{{Concurrence/Dissent5|}}} | JoinConcurrence/Dissent5 = {{{JoinConcurrence/Dissent5|}}} | Concurrence/Dissent6 = {{{Concurrence/Dissent6|}}} | JoinConcurrence/Dissent6 = {{{JoinConcurrence/Dissent6|}}} | Concurrence/Dissent7 = {{{Concurrence/Dissent7|}}} | JoinConcurrence/Dissent7 = {{{JoinConcurrence/Dissent7|}}} | Concurrence/Dissent8 = {{{Concurrence/Dissent8|}}} | JoinConcurrence/Dissent8 = {{{JoinConcurrence/Dissent8|}}} | JoinDissent = {{{JoinDissent|}}} | ConcurrenceDissent = {{{ConcurrenceDissent|}}} | Dissent2 = {{{Dissent2|}}} | JoinDissent2 = {{{JoinDissent2|}}} | ConcurrenceDissent2 = {{{ConcurrenceDissent2|}}} | Dissent3 = {{{Dissent3|}}} | JoinDissent3 = {{{JoinDissent3|}}} | ConcurrenceDissent3 = {{{ConcurrenceDissent3|}}} | Dissent4 = {{{Dissent4|}}} | JoinDissent4 = {{{JoinDissent4|}}} | ConcurrenceDissent4 = {{{ConcurrenceDissent4|}}} | Dissent5 = {{{Dissent5|}}} | JoinDissent5 = {{{JoinDissent5|}}} | ConcurrenceDissent5 = {{{ConcurrenceDissent5|}}} | NotParticipating = {{{NotParticipating|}}} | Superseded = {{{Superseded|}}} | Overruled = {{{Overruled|}}} | Overturned previous case = {{{Overturned previous case|}}} | Abrogated = {{{Abrogated|}}} }} </pre> {{hidden end}} ==Technical information== {{notice|This section contains technical information to assist editors familiar with templates and [[:mw:Help:Extension:ParserFunctions|parser functions]] to edit this template.}} The {{para|image}} parameter in the template contains the following function: <pre style="overflow: auto"> {{#invoke:InfoboxImage|InfoboxImage|image= {{#if:{{{image<includeonly>|</includeonly>}}} |{{{image}}} |{{Infobox court case/images|courtimage={{{court}}}|date={{{date decided|}}} }} }}|size={{{imagesize|}}}|sizedefault=frameless|upright=0.82|link={{{imagelink|}}}|alt={{{imagealt|}}} }} </pre> The function does the following tasks: * If the parameter {{para|image}} is used in the template, that image is displayed. If a value is specified for {{para|imagesize}}, the image is given that width; otherwise the image width defaults to 180 px. * If {{para|image}} is not used, a check is done to see if the value of {{para|court}} is listed in {{tl|Infobox court case/images}}. If the result is "None", then no image is displayed. If the result is an image file (either the coat of arms of a court or a photograph of a courthouse), then the image file is displayed. {{tl|Infobox court case/images}} can be tweaked to display different images depending on the date when the case was decided – for help with this, leave a message on the [[Template talk:Infobox court case|talk page]]. * Again, if a value is specified for {{para|imagesize}}, the image is given that width; otherwise the image width defaults to upright=0.82 (which is 180px). * In either case the image is given a link and alt text specified by {{para|imagelink}} and {{para|imagealt}}. If {{para|imagelink}} is omitted or given no value, the image is linked to its image description page. [[User:Jacklee|JackLee]] came up with the first version of this function, but thanks are due to [[User:Thumperward|Chris Cunningham]] for coming up with a cleaner solution that works better. == TemplateData == {{TemplateData header}} <templatedata> { "description": "insert description here", "params": { "name": { "label": "name", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "The short name of the case, which should preferably be the same as the article title. If the parameter is omitted, the article name is used." }, "Litigants": { "label": "Litigants", "type": "string", "required": false, "suggested": false, "deprecated": true }, "image": { "label": "image", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "An image to represent the court, such as a coat of arms or a photograph of a courthouse. Type the name of the image without the File: prefix and do not wikilink it. If you omit this parameter, the template may automatically displays an image based on the name of the court." }, "court": { "label": "Court", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "The name of the court that the case was heard in. Link the name to a Wikipedia article about the court, if there is one", "aliases": [ "CourtName" ] }, "start date": { "label": "start date", "type": "string", "required": false, "suggested": false, "deprecated": false }, "date decided": { "label": "date decided", "type": "string", "required": false, "suggested": false, "deprecated": false }, "CourtSeal": { "label": "CourtSeal", "type": "string", "required": false, "suggested": false, "deprecated": false }, "imagesize": { "label": "imagesize", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "The width of the image in pixels, particularly if it is less than 180 pixels (px). Type the number without the \"px\" suffix (\"150\", not \"150px\"). If this parameter is omitted or called but left blank, the image size defaults to 180px." }, "imagelink": { "label": "imagelink", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "Page to link to from the image. If this is specified, `imagealt`-parameter should also be specified." }, "imagealt": { "label": "imagealt", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "Alt text for the image; see Wikipedia:Alternative text for images." }, "caption": { "label": "caption", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "A caption for the image. Terms in the caption can be wikilinked, if desired." }, "full name": { "label": "FullName", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "The full name of the case, including terms like \"& Anor\" (\"and another\") or \"& Ors\" (\"and others\"). Set out here any abbreviations that appear in the short name of the case in full." }, "ArgueDate": { "label": "ArgueDate", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ArgueDateB": { "label": "ArgueDateB", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ArgueDateC": { "label": "ArgueDateC", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ArgueYear": { "label": "ArgueYear", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ArgueDateA": { "label": "ArgueDateA", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ReargueDate": { "label": "ReargueDate", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ReargueYear": { "label": "ReargueYear", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ReargueDateA": { "label": "ReargueDateA", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ReargueDateB": { "label": "ReargueDateB", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ReargueDate2": { "label": "ReargueDate2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ReargueYear2": { "label": "ReargueYear2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ReargueDateA2": { "label": "ReargueDateA2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ReargueDateB2": { "label": "ReargueDateB2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "SubmitDate": { "label": "SubmitDate", "type": "string", "required": false, "suggested": false, "deprecated": true }, "SubmitYear": { "label": "SubmitYear", "type": "string", "required": false, "suggested": false, "deprecated": true }, "DecideDate": { "label": "Date decided", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "The date the decision was handed down. Use {{start date|yyyy|mm|dd}}. In line with \"Wikipedia:Manual of Style (dates and numbers)#Linking and autoformatting of dates\", do not add wikilinks to dates.", "aliases": [ "date_decided" ] }, "DecideYear": { "label": "Year Decided", "type": "string", "required": false, "suggested": false, "deprecated": true }, "citations": { "label": "Citations", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "Citations of reports of the case. If a report is available online, use a citation template (such as {{Cite BAILII}}) where available to generate an external link automatically, or else create a link manually. Note that if the citation uses square brackets, replace them with &#91; and &#93; when putting them inside an external link.", "aliases": [ "Citation", "Citations", "CitationNew", "Neutral Citation", "Other Citations" ] }, "ECLI": { "label": "ECLI", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "The European Case Law Identifier. Available for a selection of European court cases, notably Dutch, Finnish, Spanish and EU." }, "transcripts": { "label": "Transcripts", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "External links to transcripts of the case, where available." }, "Cases_cited": { "label": "Cases_cited", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Legislation_cited": { "label": "Legislation_cited", "type": "string", "required": false, "suggested": false, "deprecated": true }, "prior_actions": { "label": "prior actions", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "Mention any prior trials or appeals, if any. Where possible, link the name of a prior case to a Wikipedia article about the case, and link citations as described above", "aliases": [ "Prior" ] }, "appealed from": { "label": "appealed from", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "If this case is an appeal, name the court from which the appeal immediately came. Link the name if possible. If the case at the lower court has its own article, that case can be linked in parentheses after the name of the court. More complicated or longer histories can use the prior actions field alongside this field or instead of it." }, "appealed to": { "label": "appealed to", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "If this case was appealed, name the court to which the appeal immediately went. Link the name if possible. If the case at the higher court has its own article, that case can be linked in parentheses after the name of the court. More complicated or longer histories can use the subsequent actions field alongside this field or instead of it." }, "subsequent_actions": { "label": "subsequent actions", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "Mention any later appeals or retrials, if any. Where possible, link the name of a subsequent case to a Wikipedia article about the case, and link citations as described above.", "aliases": [ "Subsequent" ] }, "Procedural": { "label": "Procedural", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Related": { "label": "related actions", "type": "string", "required": false, "suggested": false, "deprecated": true, "description": "Mention any related actions, for example, Mabo v Queensland (No 2) if the article is about Mabo v Queensland (No 1). Where possible, link the name of a related case to a Wikipedia article about the case, and link citations as described above." }, "OralArgument": { "label": "OralArgument", "type": "string", "required": false, "suggested": false, "deprecated": true }, "OralArguments": { "label": "OralArguments", "type": "string", "required": false, "suggested": false, "deprecated": true }, "OralReargument": { "label": "OralReargument", "type": "string", "required": false, "suggested": false, "deprecated": true }, "OpinionAnnouncement": { "label": "OpinionAnnouncement", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Outcome": { "label": "Outcome", "type": "string", "required": false, "suggested": false, "deprecated": true }, "QuestionsPresented": { "label": "QuestionsPresented", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Holding": { "label": "Holding", "type": "string", "required": false, "suggested": false, "deprecated": true, "aliases": [ "holding" ] }, "Ruling": { "label": "Ruling", "type": "string", "required": false, "suggested": false, "deprecated": true }, "opinions": { "label": "opinions", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "A very brief summary of the major findings or holdings in the case. Many case reports will have headnotes or summaries of the holdings that can be modified and entered into this field." }, "Judges": { "label": "judges", "type": "string", "required": false, "suggested": false, "deprecated": true, "description": "List the names of the judges sitting on the case, in the order of their precedence if known, separated by commas. The Chief Justice or President of the court, if they are hearing the case, should appear first. The order that the judges' names should appear in is usually shown in reports of the case. Where available, link a name to a Wikipedia article about the judge." }, "Membership": { "label": "Membership", "type": "string", "required": false, "suggested": false, "deprecated": true }, "judge": { "label": "judge", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ChiefJudge": { "label": "ChiefJudge", "type": "string", "required": false, "suggested": false, "deprecated": true }, "AssociateJudges": { "label": "AssociateJudges", "type": "string", "required": false, "suggested": false, "deprecated": true }, "number of judges": { "label": "number of judges", "type": "string", "required": false, "suggested": false, "deprecated": true, "description": "Write the number of judges in numerals. This parameter only controls whether the \"judges\" header is plural. If blank, it defaults to \"judge(s)\"." }, "decision by": { "label": "decision by", "type": "string", "required": false, "suggested": false, "deprecated": true, "description": "Name the judge who wrote the decision if more than one judge sat on the case. Do not link a name again if it was already linked in the `judges`-parameter" }, "Majority": { "label": "Majority", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Plurality": { "label": "Plurality", "type": "string", "required": false, "suggested": false, "deprecated": true }, "PerCuriam": { "label": "PerCuriam", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Dissent": { "label": "Dissent", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence": { "label": "Concurrence", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinMajority": { "label": "JoinMajority", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Majority2": { "label": "Majority2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinMajority2": { "label": "JoinMajority2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Majority3": { "label": "Majority3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinMajority3": { "label": "JoinMajority3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinPlurality": { "label": "JoinPlurality", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Plurality2": { "label": "Plurality2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinPlurality2": { "label": "JoinPlurality2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Plurality3": { "label": "Plurality3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinPlurality3": { "label": "JoinPlurality3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Plurality4": { "label": "Plurality4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinPlurality4": { "label": "JoinPlurality4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Seriatim": { "label": "Seriatim", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Seriatim2": { "label": "Seriatim2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Seriatim3": { "label": "Seriatim3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Seriatim4": { "label": "Seriatim4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Seriatim5": { "label": "Seriatim5", "type": "string", "required": false, "suggested": false, "deprecated": true }, "concurring": { "label": "concurring", "type": "string", "required": false, "suggested": false, "deprecated": true, "description": " List those judges who wrote concurring opinions, if any. Do not link a name again if it was already linked in the `judges`-parameter" }, "JoinConcurrence": { "label": "JoinConcurrence", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence2": { "label": "Concurrence2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence2": { "label": "JoinConcurrence2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence3": { "label": "Concurrence3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence3": { "label": "JoinConcurrence3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence4": { "label": "Concurrence4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence4": { "label": "JoinConcurrence4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence5": { "label": "Concurrence5", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence5": { "label": "JoinConcurrence5", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence6": { "label": "Concurrence6", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence6": { "label": "JoinConcurrence6", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence7": { "label": "Concurrence7", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence7": { "label": "JoinConcurrence7", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence8": { "label": "Concurrence8", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence8": { "label": "JoinConcurrence8", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence/Dissent": { "label": "Concurrence/Dissent", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concur/dissent": { "label": "concur/dissent", "type": "string", "required": false, "suggested": false, "deprecated": true, "description": "List those judges, if any, who wrote opinions concurring in part and dissenting in part. Do not link a name again if it was already linked in the `judges`-parameter.", "aliases": [ "concur/dissent" ] }, "JoinConcurrence/Dissent": { "label": "JoinConcurrence/Dissent", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence/Dissent2": { "label": "Concurrence/Dissent2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence/Dissent2": { "label": "JoinConcurrence/Dissent2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence/Dissent3": { "label": "Concurrence/Dissent3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence/Dissent3": { "label": "JoinConcurrence/Dissent3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence/Dissent4": { "label": "Concurrence/Dissent4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence/Dissent4": { "label": "JoinConcurrence/Dissent4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence/Dissent5": { "label": "Concurrence/Dissent5", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence/Dissent5": { "label": "JoinConcurrence/Dissent5", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence/Dissent6": { "label": "Concurrence/Dissent6", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence/Dissent6": { "label": "JoinConcurrence/Dissent6", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence/Dissent7": { "label": "Concurrence/Dissent7", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence/Dissent7": { "label": "JoinConcurrence/Dissent7", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Concurrence/Dissent8": { "label": "Concurrence/Dissent8", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinConcurrence/Dissent8": { "label": "JoinConcurrence/Dissent8", "type": "string", "required": false, "suggested": false, "deprecated": true }, "dissenting": { "label": "dissenting", "type": "string", "required": false, "suggested": false, "deprecated": true, "description": "List those judges who wrote dissenting opinions, if any. Do not link a name again if it was already linked in the `judges`-parameter" }, "JoinDissent": { "label": "JoinDissent", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ConcurrenceDissent": { "label": "ConcurrenceDissent", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Dissent2": { "label": "Dissent2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinDissent2": { "label": "JoinDissent2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ConcurrenceDissent2": { "label": "ConcurrenceDissent2", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Dissent3": { "label": "Dissent3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinDissent3": { "label": "JoinDissent3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ConcurrenceDissent3": { "label": "ConcurrenceDissent3", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Dissent4": { "label": "Dissent4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinDissent4": { "label": "JoinDissent4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "ConcurrenceDissent4": { "label": "ConcurrenceDissent4", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Dissent5": { "label": "Dissent5", "type": "string", "required": false, "suggested": false, "deprecated": true }, "JoinDissent5": { "label": "JoinDissent5", "type": "string", "required": false, "suggested": false, "deprecated": true }, "NotParticipating": { "label": "NotParticipating", "type": "string", "required": false, "suggested": false, "deprecated": true }, "LawsApplied": { "label": "LawsApplied", "type": "string", "required": false, "suggested": false, "deprecated": true }, "laws_applied": { "label": "laws_applied", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Superseded": { "label": "Superseded", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Overruled": { "label": "Overruled", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Overturned previous case": { "label": "Overturned previous case", "type": "string", "required": false, "suggested": false, "deprecated": true }, "Abrogated": { "label": "Abrogated", "type": "string", "required": false, "suggested": false, "deprecated": true }, "keywords": { "label": "keywords", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": " A list of keywords that describe the legal issues dealt with by the case. List keywords alphabetically, separate them with {{Flatlist}} or {{hlist}}, and link them to appropriate Wikipedia articles wherever possible; for example: {{hlist| [[Bailment]] |[[common carrier]] |[[negligence]] |[[strict liability]] }}", "aliases": [ "Keywords" ] }, "Area of Law": { "label": "Area of Law", "type": "string", "required": false, "suggested": false, "deprecated": true }, "italic title": { "label": "italic title", "type": "string", "required": false, "suggested": false, "deprecated": false, "description": "Indicates that the page title should be italicized. Valid values are \"yes\", \"no\" or \"force\"." } }, "format": "block" } </templatedata> == Tracking category == * {{clc|Pages using infobox court case with unknown parameters}} ==See also== * Cases of the [[Supreme Court of Canada]]&nbsp;– {{tl|Infobox SCC}} * Cases of the [[courts of England and Wales]]&nbsp;– {{tl|Infobox English case}} * Cases of European international courts&nbsp;– {{tl|Infobox European case}} * All Philippine court cases&nbsp;– {{tl|Infobox Philippines court case}} * Cases of the [[Supreme Court of the United States]]&nbsp;– {{tl|Infobox SCOTUS case}}, {{tl|SCOTUS-case}}, {{tl|SCOTUS-recentcase}}, {{tl|Infobox US court case}} ** Cases of the [[United States courts of appeals]]&nbsp;– {{tl|Infobox COA case}} ** Cases of the [[United States district courts]]&nbsp;– {{tl|Infobox United States District Court case}} ** Cases of the [[Supreme Court of California]]&nbsp;– {{tl|Infobox California Supreme Court case}} ** Cases of the [[New York Court of Appeals]]&nbsp;– {{tl|Infobox New York COA case}} * {{tl|Infobox legislation}} <includeonly>{{basepage subpage| <!-- Categories go here, and interwikis go in Wikidata --> [[Category:Court box templates]] [[Category:Law infobox templates|Court case]] [[Category:Templates that add a tracking category]] }}</includeonly> 62867e2d59113bf9dabd775250a29360a6ad4439 Template:Hidden begin/styles.css 10 214 595 594 2023-03-31T15:44:16Z 17ademoladav 2 1 revision imported sanitized-css text/css /* {{pp-template}} */ .hidden-begin { box-sizing: border-box; width: 100%; padding: 5px; border: none; font-size: 95%; } .hidden-title { font-weight: bold; line-height: 1.6; text-align: left; } .hidden-content { text-align: left; } d4ab5680ca52bee10cfd2992f2adc45452c5ab37 File:Loscourt.png 6 215 596 2023-04-01T15:50:05Z 17ademoladav 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Court of Justice 0 216 597 2023-04-01T16:00:22Z 17ademoladav 2 Created page with "{{Infobox court | court_name = League Court of Justice | native_name = <!-- native name of the court, if different --> | image = File:Loscourt.png | image_upright = <!-- [[Wikipedia:Autosizing images|image scaling factor]] for image, if applicable --> | imagesize = 180px | alt = | caption = Logo of the Court of Justice | image2 = | image_upright2 = | imagesize2..." wikitext text/x-wiki {{Infobox court | court_name = League Court of Justice | native_name = <!-- native name of the court, if different --> | image = File:Loscourt.png | image_upright = <!-- [[Wikipedia:Autosizing images|image scaling factor]] for image, if applicable --> | imagesize = 180px | alt = | caption = Logo of the Court of Justice | image2 = | image_upright2 = | imagesize2 = | alt2 = | caption2 = | established = 11 July 2022 | dissolved = <!-- use {{end date|YYYY|MM|DD}} --> | jurisdiction = All Member States who agree to its jurisdiction, Officers of the League | location = <!-- city, state/province, country --> | coordinates = <!-- {{coord|45.000|-122.000|display=inline,title}} --> | motto = | type = Legislative Selection | authority = [[League of Servers Charter| LOS Charter]], [[Court of Justice Statutes| Statutes]] | appealsto = <!-- appeals from this court go where --> | appealsfrom = <!-- appeals from what other courts are heard by this --> | terms = At the Pleasure of the WA Justice Committee | positions = 11 | budget = <!-- amount of annual budget --> | language = English | tribunal-type = International Court | website = <!-- official website. Use {{Tl|URL}} --> | chiefjudgetitle = President | chiefjudgename = John Albertson | termstart = 20 July 2022 | termend = <!-- lead position ends --> | termend2 = <!-- jurist term ends --> | chiefjudgetitle2 = Vice President | chiefjudgename2 = Gvizdod | termstart2 = 20 July 2022 | termend3 = <!-- lead position ends --> | termend4 = <!-- jurist term ends --> | division_map = <!-- image for a map of division separations, if applicable --> | division_map_upright = <!-- [[Wikipedia:Autosizing images|image scaling factor]] for map of division, if applicable --> | division_map_size = <!-- size of division map above, if applicable --> | division_map_alt = <!-- alt text for division map above, if applicable --> | division_caption = }} 90053436876240d53a048cff9141c6624410b351 MediaWiki:Citizen-footer-desc 8 217 598 2023-10-05T16:54:21Z 17ademoladav 2 Created page with "Official Library of the World Assembly, Maintained by the Directorate of Documentation of the Internal Administration Service" wikitext text/x-wiki Official Library of the World Assembly, Maintained by the Directorate of Documentation of the Internal Administration Service 761d4b823558b7083a4e365ca6ce8645be2d60cf MediaWiki:Citizen-footer-tagline 8 218 599 2023-10-05T16:56:04Z 17ademoladav 2 Created page with "©2023 Directorate of Documentation of the Internal Administration Service" wikitext text/x-wiki ©2023 Directorate of Documentation of the Internal Administration Service c4b323f2b6c1e1c3002f83a7d6c913ada7adb873 World Assembly 0 64 600 517 2023-10-05T17:54:26Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lind | leader1_term = | party1 = | election1 = 27 March 2023 | leader2_type = First Vice President | leader2 = Migaspin | party2 = | election2 = 27 March 2023 | leader2_term = | leader3_type = Second Vice President | leader3 = Collin Anderson | party3 = | election3 = 27 March 2023 | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Justice, Activity, Finance, Emeritus | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = [https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing World Assembly Procedures] | footnotes = }} The '''League of Servers World Assembly''' is the main assembly of the League’s members consisting of delegates from all member servers. The World Assembly deliberates and passes resolutions on matters of international politics, conflict resolution, and other matters as the charter prescribes. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! <center>Elected</center> / Appointed by !! <center>Assumed office</center> |- || Regno Di Italia, Mathematics || vacant|| President || World Assembly || 27 March 2023 |- || Alethkar|| Migaspin|| First Vice President || World Assembly President || 27 March 2023 |- || The Principality of Cakeycollin || Collin Anderson || Second Vice President || World Assembly President || 27 March 2023 |} == Resolutions == {| class="wikitable" style="text-align:center;" ! <center>Citation</center> !! <center>Title</center> !! <center>Summary</center> !! <center>Status</center> |- || WA/RES/21/0002 || [[WA Resolution 0002 (2021) |Calling for an End to the Usage of Gore in Discord Wars]]||The World Assembly, recognizing gore that's used on server-on-server wars/attacks, has enacted a resolution to make using gore a war crime. || In Force |- ||WA/RES/21/0003 ||[[WA Resolution 0003 (2021) |Condeming the 4th Brigade]]||The World Assembly, recognizing the attack on the Sith Empire by the 4th Brigade, has enacted a resolution on condeming the 4th. ||In Force |- ||WA/RES/21/0004||[[WA Resolution 0004 (2021) |Establishing International Awards]]||The World Assembly, realizing that some people and/or member nations have made outstanding contributions to League of Servers, have enacted a resolution establishing eight rewards to give. Along with establishing the Awards Committee within' the World Assembly||In Force |- ||WA/RES/21/0009||[[WA Resolution 0009 (2021) |Establishing an Emergency Security Council]]||The World Assembly, deeply desturbed by attacks and nukes on member servers, alarmed by the lack of discussion & recent action among the Security Council, to seek cooperation & coordination to protect the league, and its members from further hostilities. Enacts a resolution to established a fifthteen member Emergency Security Council created by the Secretary General, who will be granted power and authority of the Security Council on matters of peace and security.||Unknown - Likely defunct |- ||WA/RES/22/0001||[[WA Resolution 0001 (2022)|Activity, Economy Changes and Events]]||The World Assembly, recognizing the inactivity within the League of Servers, has enacted a resolution to revitalize the community through the establishment of a lottery employment system, creation of new lottery roles, modification of League Credits collection methods, adjustments to current product pricing, introduction of new products, and facilitating exchange of League Credits with member-servers' currencies. This resolution aims to boost engagement and participation within the League of Servers.||In Force |- ||WA/RES/22/0002||[[WA Resolution 0002 (2022)|The Right to Inspection]]||The World Assembly, acknowledging the threat of inactive servers hindering the inclusion of active and dynamic nations, enacts a resolution to establish the Activity Committee of the World Assembly. This committee, overseen by the President and Inspector General, will be responsible for visiting and verifying the activity of League servers. Servers must comply with League standards and welcome Activity Committee members for assessment. Non-compliant servers will be given a probationary period and may face expulsion from the League if improvements are not made. This resolution aims to maintain a high level of activity and engagement within the League of Servers.||In Force |} 2aa3bbae0ae3b9740a1971e107a6b2f666006bf4 601 600 2023-10-05T17:54:58Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lind | leader1_term = | party1 = | election1 = 27 March 2023 | leader2_type = First Vice President | leader2 = Migaspin | party2 = | election2 = 27 March 2023 | leader2_term = | leader3_type = Second Vice President | leader3 = Collin Anderson | party3 = | election3 = 27 March 2023 | leader3_term = | leader4_type = | leader4 = | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Justice, Activity, Finance, Emeritus | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = [https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing World Assembly Procedures] | footnotes = }} The '''League of Servers World Assembly''' is the main assembly of the League’s members consisting of delegates from all member servers. The World Assembly deliberates and passes resolutions on matters of international politics, conflict resolution, and other matters as the charter prescribes. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! <center>Elected</center> / Appointed by !! <center>Assumed office</center> |- || N/A || Vacant|| President || World Assembly || |- || Alethkar|| Migaspin|| First Vice President || World Assembly President || 27 March 2023 |- || The Principality of Cakeycollin || Collin Anderson || Second Vice President || World Assembly President || 27 March 2023 |} == Resolutions == {| class="wikitable" style="text-align:center;" ! <center>Citation</center> !! <center>Title</center> !! <center>Summary</center> !! <center>Status</center> |- || WA/RES/21/0002 || [[WA Resolution 0002 (2021) |Calling for an End to the Usage of Gore in Discord Wars]]||The World Assembly, recognizing gore that's used on server-on-server wars/attacks, has enacted a resolution to make using gore a war crime. || In Force |- ||WA/RES/21/0003 ||[[WA Resolution 0003 (2021) |Condeming the 4th Brigade]]||The World Assembly, recognizing the attack on the Sith Empire by the 4th Brigade, has enacted a resolution on condeming the 4th. ||In Force |- ||WA/RES/21/0004||[[WA Resolution 0004 (2021) |Establishing International Awards]]||The World Assembly, realizing that some people and/or member nations have made outstanding contributions to League of Servers, have enacted a resolution establishing eight rewards to give. Along with establishing the Awards Committee within' the World Assembly||In Force |- ||WA/RES/21/0009||[[WA Resolution 0009 (2021) |Establishing an Emergency Security Council]]||The World Assembly, deeply desturbed by attacks and nukes on member servers, alarmed by the lack of discussion & recent action among the Security Council, to seek cooperation & coordination to protect the league, and its members from further hostilities. Enacts a resolution to established a fifthteen member Emergency Security Council created by the Secretary General, who will be granted power and authority of the Security Council on matters of peace and security.||Unknown - Likely defunct |- ||WA/RES/22/0001||[[WA Resolution 0001 (2022)|Activity, Economy Changes and Events]]||The World Assembly, recognizing the inactivity within the League of Servers, has enacted a resolution to revitalize the community through the establishment of a lottery employment system, creation of new lottery roles, modification of League Credits collection methods, adjustments to current product pricing, introduction of new products, and facilitating exchange of League Credits with member-servers' currencies. This resolution aims to boost engagement and participation within the League of Servers.||In Force |- ||WA/RES/22/0002||[[WA Resolution 0002 (2022)|The Right to Inspection]]||The World Assembly, acknowledging the threat of inactive servers hindering the inclusion of active and dynamic nations, enacts a resolution to establish the Activity Committee of the World Assembly. This committee, overseen by the President and Inspector General, will be responsible for visiting and verifying the activity of League servers. Servers must comply with League standards and welcome Activity Committee members for assessment. Non-compliant servers will be given a probationary period and may face expulsion from the League if improvements are not made. This resolution aims to maintain a high level of activity and engagement within the League of Servers.||In Force |} b9ec676c0677ebff589821db3fe612918397d791 602 601 2023-11-10T19:10:01Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lady Eca Astronova | leader1_term = | party1 = | election1 = 07 October 2023 | leader2_type = First Vice President | leader2 = Colin Anderson | party2 = | election2 = | leader2_term = | leader3_type = Second Vice President | leader3 = John Albertson | party3 = | election3 = | leader3_term = | leader4_type = Third Vice President | leader4 = V.A. Georgy | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Diplomacy and Peace </br> Justice </br> Activity </br> Finance </br> Procedures </br> Olympics </br> Standardisation | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = [https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing World Assembly Procedures] | footnotes = }} The '''League of Servers World Assembly''' is the main assembly of the League’s members consisting of delegates from all member servers. The World Assembly deliberates and passes resolutions on matters of international politics, conflict resolution, and other matters as the charter prescribes. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! <center>Elected</center> / Appointed by !! <center>Assumed office</center> |- || N/A || Vacant|| President || World Assembly || |- || Alethkar|| Migaspin|| First Vice President || World Assembly President || 27 March 2023 |- || The Principality of Cakeycollin || Collin Anderson || Second Vice President || World Assembly President || 27 March 2023 |} == Resolutions == {| class="wikitable" style="text-align:center;" ! <center>Citation</center> !! <center>Title</center> !! <center>Summary</center> !! <center>Status</center> |- || WA/RES/21/0002 || [[WA Resolution 0002 (2021) |Calling for an End to the Usage of Gore in Discord Wars]]||The World Assembly, recognizing gore that's used on server-on-server wars/attacks, has enacted a resolution to make using gore a war crime. || In Force |- ||WA/RES/21/0003 ||[[WA Resolution 0003 (2021) |Condeming the 4th Brigade]]||The World Assembly, recognizing the attack on the Sith Empire by the 4th Brigade, has enacted a resolution on condeming the 4th. ||In Force |- ||WA/RES/21/0004||[[WA Resolution 0004 (2021) |Establishing International Awards]]||The World Assembly, realizing that some people and/or member nations have made outstanding contributions to League of Servers, have enacted a resolution establishing eight rewards to give. Along with establishing the Awards Committee within' the World Assembly||In Force |- ||WA/RES/21/0009||[[WA Resolution 0009 (2021) |Establishing an Emergency Security Council]]||The World Assembly, deeply desturbed by attacks and nukes on member servers, alarmed by the lack of discussion & recent action among the Security Council, to seek cooperation & coordination to protect the league, and its members from further hostilities. Enacts a resolution to established a fifthteen member Emergency Security Council created by the Secretary General, who will be granted power and authority of the Security Council on matters of peace and security.||Unknown - Likely defunct |- ||WA/RES/22/0001||[[WA Resolution 0001 (2022)|Activity, Economy Changes and Events]]||The World Assembly, recognizing the inactivity within the League of Servers, has enacted a resolution to revitalize the community through the establishment of a lottery employment system, creation of new lottery roles, modification of League Credits collection methods, adjustments to current product pricing, introduction of new products, and facilitating exchange of League Credits with member-servers' currencies. This resolution aims to boost engagement and participation within the League of Servers.||In Force |- ||WA/RES/22/0002||[[WA Resolution 0002 (2022)|The Right to Inspection]]||The World Assembly, acknowledging the threat of inactive servers hindering the inclusion of active and dynamic nations, enacts a resolution to establish the Activity Committee of the World Assembly. This committee, overseen by the President and Inspector General, will be responsible for visiting and verifying the activity of League servers. Servers must comply with League standards and welcome Activity Committee members for assessment. Non-compliant servers will be given a probationary period and may face expulsion from the League if improvements are not made. This resolution aims to maintain a high level of activity and engagement within the League of Servers.||In Force |} f6d682da10499af8a6c18f49b73d59e7df648478 603 602 2023-11-10T19:12:06Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lady Eca Astronova | leader1_term = | party1 = | election1 = 07 October 2023 | leader2_type = First Vice President | leader2 = Colin Anderson | party2 = | election2 = | leader2_term = | leader3_type = Second Vice President | leader3 = John Albertson | party3 = | election3 = | leader3_term = | leader4_type = Third Vice President | leader4 = V.A. Georgy | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Diplomacy and Peace </br> Justice </br> Activity </br> Finance </br> Procedures </br> Olympics </br> Standardisation | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = [https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing World Assembly Procedures] | footnotes = }} The '''League of Servers World Assembly''' is the main assembly of the League’s members consisting of delegates from all member servers. The World Assembly deliberates and passes resolutions on matters of international politics, conflict resolution, and other matters as the charter prescribes. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! <center>Elected</center> / Appointed by !! <center>Assumed office</center> |- || N/A || Vacant|| President || World Assembly || |- || Alethkar|| Migaspin|| First Vice President || World Assembly President || 27 March 2023 |- || The Principality of Cakeycollin || Collin Anderson || Second Vice President || World Assembly President || 27 March 2023 |} == Committees == 0d502cecf5314ddb0ede28d2b0e947eacb7c20ee 604 603 2023-11-10T19:16:14Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lady Eca Astronova | leader1_term = | party1 = | election1 = 07 October 2023 | leader2_type = First Vice President | leader2 = Colin Anderson | party2 = | election2 = | leader2_term = | leader3_type = Second Vice President | leader3 = John Albertson | party3 = | election3 = | leader3_term = | leader4_type = Third Vice President | leader4 = V.A. Georgy | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Diplomacy and Peace </br> Justice </br> Activity </br> Finance </br> Procedures </br> Olympics </br> Standardisation | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = [https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing World Assembly Procedures] | footnotes = }} The '''League of Servers World Assembly''' is the main assembly of the League’s members consisting of delegates from all member servers. The World Assembly deliberates and passes resolutions on matters of international politics, conflict resolution, and other matters as the charter prescribes. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! <center>Elected</center> / Appointed by !! <center>Assumed office</center> |- || Grand Xylosian Empire || Lasy Eca Astronova|| President || World Assembly || |- || Alethkar|| Migaspin|| First Vice President || World Assembly President || 27 March 2023 |- || The Principality of Cakeycollin || Collin Anderson || Second Vice President || World Assembly President || 27 March 2023 |} == Committees == 4bda9e79218a6ead98084be4c56fb588bdc0f25a 605 604 2023-11-10T19:20:25Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lady Eca Astronova | leader1_term = | party1 = | election1 = 07 October 2023 | leader2_type = First Vice President | leader2 = Collin Anderson | party2 = | election2 = | leader2_term = | leader3_type = Second Vice President | leader3 = John Albertson | party3 = | election3 = | leader3_term = | leader4_type = Third Vice President | leader4 = V.A. Georgy | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Diplomacy and Peace </br> Justice </br> Activity </br> Finance </br> Procedures </br> Olympics </br> Standardisation | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = [https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing World Assembly Procedures] | footnotes = }} The '''League of Servers World Assembly''' is the main assembly of the League’s members consisting of delegates from all member servers. The World Assembly deliberates and passes resolutions on matters of international politics, conflict resolution, and other matters as the charter prescribes. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! <center>Elected</center> / Appointed by !! <center>Assumed office</center> |- || Grand Xylosian Empire || Lasy Eca Astronova|| President || World Assembly || 07 October 2023 |- || Principality of Cakeycollin || Collin Anderson|| First Vice President || World Assembly President || 08 October 2023 |- || Empire of Furnovskyland's Commonwealth || John Albertson || Second Vice President || World Assembly President || 08 October 2023 |- || The Republic of E-Wall || V.A. Georgy || Third Vice President || World Assembly President || 08 October 2023 |} == Committees == da758eeb6a67e33276357bf58d878548497baee7 606 605 2023-11-10T19:21:40Z 17ademoladav 2 17ademoladav moved page [[The World Assembly]] to [[World Assembly]] without leaving a redirect wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lady Eca Astronova | leader1_term = | party1 = | election1 = 07 October 2023 | leader2_type = First Vice President | leader2 = Collin Anderson | party2 = | election2 = | leader2_term = | leader3_type = Second Vice President | leader3 = John Albertson | party3 = | election3 = | leader3_term = | leader4_type = Third Vice President | leader4 = V.A. Georgy | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Diplomacy and Peace </br> Justice </br> Activity </br> Finance </br> Procedures </br> Olympics </br> Standardisation | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = [https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing World Assembly Procedures] | footnotes = }} The '''League of Servers World Assembly''' is the main assembly of the League’s members consisting of delegates from all member servers. The World Assembly deliberates and passes resolutions on matters of international politics, conflict resolution, and other matters as the charter prescribes. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Nation </center> !! <center> Officer </center> !! <center>Office</center> !! <center>Elected</center> / Appointed by !! <center>Assumed office</center> |- || Grand Xylosian Empire || Lasy Eca Astronova|| President || World Assembly || 07 October 2023 |- || Principality of Cakeycollin || Collin Anderson|| First Vice President || World Assembly President || 08 October 2023 |- || Empire of Furnovskyland's Commonwealth || John Albertson || Second Vice President || World Assembly President || 08 October 2023 |- || The Republic of E-Wall || V.A. Georgy || Third Vice President || World Assembly President || 08 October 2023 |} == Committees == da758eeb6a67e33276357bf58d878548497baee7 609 606 2023-11-10T20:23:16Z 17ademoladav 2 wikitext text/x-wiki {{Infobox legislature | name = World Assembly | native_name = | native_name_lang = | transcription_name = | legislature = | coa_pic = | coa_res = | coa_alt = | coa_caption = | logo_pic = File:Los.png | logo_res = 180px | logo_alt = | logo_caption = | house_type = Principal Organ | houses = | chambers = | body = | jurisdiction = | term_limits = | foundation = <!-- {{Start date|YYYY|MM|DD}} --> | disbanded = <!-- {{End date|YYYY|MM|DD}} --> | preceded_by = | succeeded_by = | new_session = | leader1_type = President | leader1 = Lady Eca Astronova | leader1_term = | party1 = | election1 = 07 October 2023 | leader2_type = First Vice President | leader2 = Collin Anderson | party2 = | election2 = | leader2_term = | leader3_type = Second Vice President | leader3 = John Albertson | party3 = | election3 = | leader3_term = | leader4_type = Third Vice President | leader4 = V.A. Georgy | party4 = | election4 = | leader4_term = | leader5_type = | leader5 = | party5 = | election5 = | leader5_term = | leader6_type = | leader6 = | party6 = | election6 = | leader6_term = | leader7_type = <!-- up to | leader10_type = --> | leader7 = <!-- up to | leader10 = --> | party7 = <!-- up to | party10 = --> | election7 = <!-- up to | election10 = --> | leader7_term = <!-- up to | leader10_term = --> | seats = | structure1 = | structure1_res = | structure1_alt = | structure2 = | structure2_res = | structure2_alt = | house1 = | political_groups1 = | committees1 = Diplomacy and Peace </br> Justice </br> Activity </br> Finance </br> Procedures </br> Olympics </br> Standardisation | house2 = | political_groups2 = | committees2 = | joint_committees = | term_length = | authority = | salary = | seats1_title = | seats1 = | seats2_title = | seats2 = | seats3_title = | seats3 = | seats4_title = | seats4 = | seats5_title = | seats5 = | seats6_title = | seats6 = | seats7_title = | seats7 = | seats8_title = <!-- up to | seats10_title = --> | seats8 = <!-- up to | seats10 = --> | voting_system1 = | voting_system2 = | first_election1 = | first_election2 = | first_election3 = | last_election1 = | last_election2 = | last_election3 = | next_election1 = | next_election2 = | next_election3 = | redistricting = | motto = | session_room = | session_res = | session_alt = | meeting_place = | session_room2 = | session_res2 = | session_alt2 = | meeting_place2 = | session_room3 = | session_res3 = | session_alt3 = | meeting_place3 = | website = <!-- {{URL|www.example.com}} --> | constitution = | rules = [https://docs.google.com/document/d/1Y3_zsDI7jJgUEfGhU-hClskan0dRq4fBew79NgTrA1o/edit?usp=sharing World Assembly Procedures] | footnotes = }} The '''League of Servers World Assembly''' is the main assembly of the League’s members consisting of delegates from all member servers. The World Assembly deliberates and passes resolutions on matters of international politics, conflict resolution, and other matters as the charter prescribes. == Presiding Officers == {| class="wikitable" style="text-align:center;" ! <center>Server </center> !! <center> Officer </center> !! <center>Office</center> !! <center>Elected</center> / Appointed by !! <center>Assumed office</center> |- || Grand Xylosian Empire || Lasy Eca Astronova|| President || World Assembly || 07 October 2023 |- || Principality of Cakeycollin || Collin Anderson|| First Vice President || World Assembly President || 08 October 2023 |- || Empire of Furnovskyland's Commonwealth || John Albertson || Second Vice President || World Assembly President || 08 October 2023 |- || The Republic of E-Wall || V.A. Georgy || Third Vice President || World Assembly President || 08 October 2023 |} e120ff7e6a9e10660f81ef41c7f1e410554f8bf2 Home 0 1 607 474 2023-11-10T19:22:05Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the Library of World Assembly </b></big></big></center> <div class="three-boxes-container"> <div class="three-boxes-box"> <h2>World Assembly</h2> <p>'''<big>[[World Assembly| World Assembly Resolutions]]</big>'''</p> <p>'''<big>[[World Assembly Resolutions| World Assembly Resolutions]]</big>'''</p> <p> '''<big>[[World Assembly Proclamations| World Assembly Proclamations]]</big>'''</p> </div> <div class="three-boxes-box"> <h2>Security Council</h2> <p>'''<big>[[Security Council| Security Council Resolutions]]</big>'''</p> </div> <div class="three-boxes-box"> <h2>Court of Justice</h2> <p>'''<big>[[Court of Justice| Court Rulings]]</big>'''</p> </div> </div> <big> '''Record A WA Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''Resolution 0000'' preload=Archivarius:Record A Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> <big> '''Record A SC Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''SC Resolution 0000'' preload=Archivarius:Record A SC Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> 05ae7cf4acd71e06db2e6fb931d89c6967e22c4e 608 607 2023-11-10T19:22:18Z 17ademoladav 2 wikitext text/x-wiki <center><big><big><b> Welcome to the Library of World Assembly </b></big></big></center> <div class="three-boxes-container"> <div class="three-boxes-box"> <h2>World Assembly</h2> <p>'''<big>[[World Assembly| World Assembly]]</big>'''</p> <p>'''<big>[[World Assembly Resolutions| World Assembly Resolutions]]</big>'''</p> <p> '''<big>[[World Assembly Proclamations| World Assembly Proclamations]]</big>'''</p> </div> <div class="three-boxes-box"> <h2>Security Council</h2> <p>'''<big>[[Security Council| Security Council Resolutions]]</big>'''</p> </div> <div class="three-boxes-box"> <h2>Court of Justice</h2> <p>'''<big>[[Court of Justice| Court Rulings]]</big>'''</p> </div> </div> <big> '''Record A WA Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''Resolution 0000'' preload=Archivarius:Record A Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> <big> '''Record A SC Resolution (Staff Only)''' </big> <inputbox> type=create width=70 placeholder=Ex: ''SC Resolution 0000'' preload=Archivarius:Record A SC Resolution summary=Created Resolution via "Record a Resolution" tool </inputbox> 5138704fa599d9ae23ccf634e005f6a69122d7b7